=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rcs/xmalloc.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- src/usr.bin/rcs/xmalloc.c 2009/06/07 08:39:13 1.4 +++ src/usr.bin/rcs/xmalloc.c 2014/09/27 15:16:36 1.5 @@ -1,4 +1,4 @@ -/* $OpenBSD: xmalloc.c,v 1.4 2009/06/07 08:39:13 ray Exp $ */ +/* $OpenBSD: xmalloc.c,v 1.5 2014/09/27 15:16:36 otto Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -32,8 +32,8 @@ ptr = malloc(size); if (ptr == NULL) errx(1, - "xmalloc: out of memory (allocating %lu bytes)", - (u_long) size); + "xmalloc: out of memory (allocating %zu bytes)", + size); return ptr; } @@ -48,8 +48,8 @@ errx(1, "xcalloc: nmemb * size > SIZE_MAX"); ptr = calloc(nmemb, size); if (ptr == NULL) - errx(1, "xcalloc: out of memory (allocating %lu bytes)", - (u_long)(size * nmemb)); + errx(1, "xcalloc: out of memory (allocating %zu bytes)", + (size * nmemb)); return ptr; } @@ -68,8 +68,8 @@ else new_ptr = realloc(ptr, new_size); if (new_ptr == NULL) - errx(1, "xrealloc: out of memory (new_size %lu bytes)", - (u_long) new_size); + errx(1, "xrealloc: out of memory (new_size %zu bytes)", + new_size); return new_ptr; }