summaryrefslogtreecommitdiff
path: root/usr.bin/tcpbench
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2009-12-11 17:20:51 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2009-12-11 17:20:51 +0000
commitcb1f9a737246fa974152d44bcc7fb22b5b64d6c2 (patch)
tree5f80cc71ba7ecaa2eea5611d6dc1adf7e74747a6 /usr.bin/tcpbench
parentdf728625706b637c4de13da091ab760572fa9ffd (diff)
try not to use size_t in places it does not belong; ok djm
Diffstat (limited to 'usr.bin/tcpbench')
-rw-r--r--usr.bin/tcpbench/tcpbench.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/tcpbench/tcpbench.c b/usr.bin/tcpbench/tcpbench.c
index d1a68d91781..18ff4574a1d 100644
--- a/usr.bin/tcpbench/tcpbench.c
+++ b/usr.bin/tcpbench/tcpbench.c
@@ -193,9 +193,9 @@ print_header(void)
}
static void
-kget(kvm_t *kh, u_long addr, void *buf, int size)
+kget(kvm_t *kh, u_long addr, void *buf, size_t size)
{
- if (kvm_read(kh, addr, buf, size) != size)
+ if (kvm_read(kh, addr, buf, size) != (ssize_t)size)
errx(1, "kvm_read: %s", kvm_geterr(kh));
}
@@ -333,7 +333,7 @@ kupdate_stats(kvm_t *kh, u_long tcbaddr,
static void
check_kvar(const char *var)
{
- size_t i;
+ u_int i;
for (i = 0; allowed_kvars[i] != NULL; i++)
if (strcmp(allowed_kvars[i], var) == 0)
@@ -344,7 +344,7 @@ check_kvar(const char *var)
static void
list_kvars(void)
{
- size_t i;
+ u_int i;
fprintf(stderr, "Supported kernel variables:\n");
for (i = 0; allowed_kvars[i] != NULL; i++)
@@ -355,7 +355,7 @@ static char **
check_prepare_kvars(char *list)
{
char *item, **ret = NULL;
- size_t n = 0;
+ u_int n = 0;
while ((item = strsep(&list, ", \t\n")) != NULL) {
check_kvar(item);