diff options
author | Kevin Steves <stevesk@cvs.openbsd.org> | 2002-03-25 20:12:11 +0000 |
---|---|---|
committer | Kevin Steves <stevesk@cvs.openbsd.org> | 2002-03-25 20:12:11 +0000 |
commit | 2886fce7217a6ae81835d100f588aa86052238b7 (patch) | |
tree | dd3d0c109e8140df5a1f0bc91f2a5a84238e577f /usr.bin/ssh | |
parent | 0168ebcfe8791fb4e1fa88a1d37c464001776be1 (diff) |
ssize_t args use "%ld" and cast to (long)
size_t args use "%lu" and cast to (u_long)
ok markus@ and thanks millert@
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/monitor_mm.c | 20 | ||||
-rw-r--r-- | usr.bin/ssh/monitor_wrap.c | 6 |
2 files changed, 13 insertions, 13 deletions
diff --git a/usr.bin/ssh/monitor_mm.c b/usr.bin/ssh/monitor_mm.c index bce98c93cf2..b383193cd35 100644 --- a/usr.bin/ssh/monitor_mm.c +++ b/usr.bin/ssh/monitor_mm.c @@ -24,7 +24,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: monitor_mm.c,v 1.3 2002/03/19 10:41:32 markus Exp $"); +RCSID("$OpenBSD: monitor_mm.c,v 1.4 2002/03/25 20:12:10 stevesk Exp $"); #include <sys/mman.h> @@ -56,8 +56,8 @@ mm_make_entry(struct mm_master *mm, struct mmtree *head, tmp2 = RB_INSERT(mmtree, head, tmp); if (tmp2 != NULL) - fatal("mm_make_entry(%p): double address %p->%p(%d)", - mm, tmp2, address, size); + fatal("mm_make_entry(%p): double address %p->%p(%lu)", + mm, tmp2, address, (u_long)size); return (tmp); } @@ -85,7 +85,7 @@ mm_create(struct mm_master *mmalloc, size_t size) address = mmap(NULL, size, PROT_WRITE|PROT_READ, MAP_ANON|MAP_SHARED, -1, 0); if (address == MAP_FAILED) - fatal("mmap(%d)", size); + fatal("mmap(%lu)", (u_long)size); mm->address = address; mm->size = size; @@ -124,7 +124,7 @@ mm_destroy(struct mm_master *mm) mm_freelist(mm->mmalloc, &mm->rb_allocated); if (munmap(mm->address, mm->size) == -1) - fatal("munmap(%p, %d)", mm->address, mm->size); + fatal("munmap(%p, %lu)", mm->address, (u_long)mm->size); if (mm->mmalloc == NULL) xfree(mm); else @@ -138,7 +138,7 @@ mm_xmalloc(struct mm_master *mm, size_t size) address = mm_malloc(mm, size); if (address == NULL) - fatal("%s: mm_malloc(%d)", __FUNCTION__, size); + fatal("%s: mm_malloc(%lu)", __FUNCTION__, (u_long)size); return (address); } @@ -223,8 +223,8 @@ mm_free(struct mm_master *mm, void *address) /* Check if range does not overlap */ if (prev != NULL && MM_ADDRESS_END(prev) > address) - fatal("mm_free: memory corruption: %p(%d) > %p", - prev->address, prev->size, address); + fatal("mm_free: memory corruption: %p(%lu) > %p", + prev->address, (u_long)prev->size, address); /* See if we can merge backwards */ if (prev != NULL && MM_ADDRESS_END(prev) == address) { @@ -246,8 +246,8 @@ mm_free(struct mm_master *mm, void *address) return; if (MM_ADDRESS_END(prev) > mms->address) - fatal("mm_free: memory corruption: %p < %p(%d)", - mms->address, prev->address, prev->size); + fatal("mm_free: memory corruption: %p < %p(%lu)", + mms->address, prev->address, (u_long)prev->size); if (MM_ADDRESS_END(prev) != mms->address) return; diff --git a/usr.bin/ssh/monitor_wrap.c b/usr.bin/ssh/monitor_wrap.c index e477cff2514..37d38059cd3 100644 --- a/usr.bin/ssh/monitor_wrap.c +++ b/usr.bin/ssh/monitor_wrap.c @@ -25,7 +25,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: monitor_wrap.c,v 1.4 2002/03/19 14:27:39 markus Exp $"); +RCSID("$OpenBSD: monitor_wrap.c,v 1.5 2002/03/25 20:12:10 stevesk Exp $"); #include <openssl/bn.h> #include <openssl/dh.h> @@ -88,7 +88,7 @@ mm_request_receive(int socket, Buffer *m) if (res != sizeof(buf)) { if (res == 0) fatal_cleanup(); - fatal("%s: read: %d", __FUNCTION__, res); + fatal("%s: read: %ld", __FUNCTION__, (long)res); } msg_len = GET_32BIT(buf); if (msg_len > 256 * 1024) @@ -97,7 +97,7 @@ mm_request_receive(int socket, Buffer *m) buffer_append_space(m, msg_len); res = atomicio(read, socket, buffer_ptr(m), msg_len); if (res != msg_len) - fatal("%s: read: %d != msg_len", __FUNCTION__, res); + fatal("%s: read: %ld != msg_len", __FUNCTION__, (long)res); } void |