- stevesk@cvs.openbsd.org 2002/03/25 20:12:10
[monitor_mm.c monitor_wrap.c]
ssize_t args use "%ld" and cast to (long)
size_t args use "%lu" and cast to (u_long)
ok markus@ and thanks millert@
diff --git a/ChangeLog b/ChangeLog
index 079c7bf..e4ffad5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -31,6 +31,11 @@
- markus@cvs.openbsd.org 2002/03/25 17:34:27
[scard.c scard.h ssh-agent.c ssh-keygen.c ssh.c]
change sc_get_key to sc_get_keys and hide smartcard details in scard.c
+ - stevesk@cvs.openbsd.org 2002/03/25 20:12:10
+ [monitor_mm.c monitor_wrap.c]
+ ssize_t args use "%ld" and cast to (long)
+ size_t args use "%lu" and cast to (u_long)
+ ok markus@ and thanks millert@
20020324
- (stevesk) [session.c] disable LOGIN_NEEDS_TERM until we are sure
@@ -8045,4 +8050,4 @@
- Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1
-$Id: ChangeLog,v 1.1987 2002/03/26 03:17:42 mouring Exp $
+$Id: ChangeLog,v 1.1988 2002/03/26 03:20:45 mouring Exp $
diff --git a/monitor_mm.c b/monitor_mm.c
index bce98c9..b383193 100644
--- a/monitor_mm.c
+++ b/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 @@
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 @@
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_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 @@
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 @@
/* 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 @@
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/monitor_wrap.c b/monitor_wrap.c
index 8b0ded1..53bf59b 100644
--- a/monitor_wrap.c
+++ b/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 @@
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 @@
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