summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2005-10-26 19:44:17 +0000
committerpjd <pjd@FreeBSD.org>2005-10-26 19:44:17 +0000
commitb4784d4ebf8d49c280b30a20a3288b503d76966d (patch)
tree07676fc805ec81f11ec81adc4d3ab7ec4b5a484e /tools
parent6140104fb25ade1d87d1a48609c93b44dc02a9f0 (diff)
downloadFreeBSD-src-b4784d4ebf8d49c280b30a20a3288b503d76966d.zip
FreeBSD-src-b4784d4ebf8d49c280b30a20a3288b503d76966d.tar.gz
Change u_int64_t to uintmax_t and use %ju, so it compiles on 64bit archs.
I changed every u_int64_t to uintmax_t, as we should use eventually uint64_t anyway those days.
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/netrate/http/http.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/tools/netrate/http/http.c b/tools/tools/netrate/http/http.c
index 17c7d6d..7c36db4 100644
--- a/tools/tools/netrate/http/http.c
+++ b/tools/tools/netrate/http/http.c
@@ -35,6 +35,7 @@
#include <err.h>
#include <pthread.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -52,8 +53,8 @@
struct http_worker_description {
pthread_t hwd_thread;
- u_int64_t hwd_count;
- u_int64_t hwd_errorcount;
+ uintmax_t hwd_count;
+ uintmax_t hwd_errorcount;
};
static struct sockaddr_in sin;
@@ -149,7 +150,7 @@ http_worker(void *arg)
int
main(int argc, char *argv[])
{
- u_int64_t total;
+ uintmax_t total;
int i;
if (argc != 4)
@@ -186,10 +187,10 @@ main(int argc, char *argv[])
total = 0;
for (i = 0; i < THREADS; i++)
total += hwd[i].hwd_count;
- printf("%llu transfers/second\n", total / SECONDS);
+ printf("%ju transfers/second\n", total / SECONDS);
total = 0;
for (i = 0; i < THREADS; i++)
total += hwd[i].hwd_errorcount;
- printf("%llu errors/second\n", total / SECONDS);
+ printf("%ju errors/second\n", total / SECONDS);
return (0);
}
OpenPOWER on IntegriCloud