=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/xmalloc.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- src/usr.bin/ssh/xmalloc.c 1999/09/30 04:30:03 1.3 +++ src/usr.bin/ssh/xmalloc.c 1999/11/23 22:25:56 1.4 @@ -15,42 +15,46 @@ */ #include "includes.h" -RCSID("$Id: xmalloc.c,v 1.3 1999/09/30 04:30:03 deraadt Exp $"); +RCSID("$Id: xmalloc.c,v 1.4 1999/11/23 22:25:56 markus Exp $"); #include "ssh.h" -void *xmalloc(size_t size) +void * +xmalloc(size_t size) { - void *ptr = malloc(size); - if (ptr == NULL) - fatal("xmalloc: out of memory (allocating %d bytes)", (int)size); - return ptr; + void *ptr = malloc(size); + if (ptr == NULL) + fatal("xmalloc: out of memory (allocating %d bytes)", (int) size); + return ptr; } -void *xrealloc(void *ptr, size_t new_size) +void * +xrealloc(void *ptr, size_t new_size) { - void *new_ptr; + void *new_ptr; - if (ptr == NULL) - fatal("xrealloc: NULL pointer given as argument"); - new_ptr = realloc(ptr, new_size); - if (new_ptr == NULL) - fatal("xrealloc: out of memory (new_size %d bytes)", (int)new_size); - return new_ptr; + if (ptr == NULL) + fatal("xrealloc: NULL pointer given as argument"); + new_ptr = realloc(ptr, new_size); + if (new_ptr == NULL) + fatal("xrealloc: out of memory (new_size %d bytes)", (int) new_size); + return new_ptr; } -void xfree(void *ptr) +void +xfree(void *ptr) { - if (ptr == NULL) - fatal("xfree: NULL pointer given as argument"); - free(ptr); + if (ptr == NULL) + fatal("xfree: NULL pointer given as argument"); + free(ptr); } -char *xstrdup(const char *str) +char * +xstrdup(const char *str) { - int len = strlen(str) + 1; + int len = strlen(str) + 1; - char *cp = xmalloc(len); - strlcpy(cp, str, len); - return cp; + char *cp = xmalloc(len); + strlcpy(cp, str, len); + return cp; }