[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@
This commit is contained in:
Ben Lindstrom 2002-03-26 03:20:45 +00:00
parent 0936a5bb72
commit c861547f34
3 changed files with 19 additions and 14 deletions

View File

@ -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 $

View File

@ -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;

View File

@ -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