Commit 469f91d4 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(srealloc): Fixed printf-style modifiers in calls to restart_kom.

parent 6fc7385e
/*
* $Id: ram-smalloc.c,v 0.21 1995/11/02 20:03:30 ceder Exp $
* $Id: ram-smalloc.c,v 0.22 1996/08/04 01:29:47 ceder Exp $
* Copyright (C) 1991, 1992, 1993, 1994, 1995 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -37,7 +37,7 @@
*/
/* #define DEBUG_MALLOC */
static char *rcsid = "$Id: ram-smalloc.c,v 0.21 1995/11/02 20:03:30 ceder Exp $";
static char *rcsid = "$Id: ram-smalloc.c,v 0.22 1996/08/04 01:29:47 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -173,15 +173,15 @@ srealloc(void * ptr, size_t size) /* Never fails. It is legal to */
if (((unsigned char *) (ip+2))[ip[1]] != 0x89 ||
((unsigned char *) (ip+2))[ip[1]+1] != 0xA7)
restart_kom("SREALLOC: Buffer overflow, osize = %ul, nsize = %ul\n",
ip[1], size);
restart_kom("SREALLOC: Buffer overflow, osize = %ul, nsize = %lu.\n",
ip[1], (unsigned long)size);
*ip = SMALLOC_MAGIC_FREE;
if ( (new_ptr = (unsigned int *) realloc((void *) ip,
size+2*sizeof(unsigned int)+2) ) == NULL )
{
restart_kom("Out of memory - can't realloc. ptr = %d size = %d. ",
(int)ptr, size);
restart_kom("Out of memory - can't realloc. ptr = %lu size = %lu.\n",
(unsigned long)ptr, (unsigned long)size);
}
*new_ptr++ = SMALLOC_MAGIC_ALLOC;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment