Mercurial > dropbear
diff scpmisc.c @ 299:740e782679be ucc-axis-hack
Various changes to compile+kind of run on UCC's axis board.
Note that fprintf(stdin -> printf( accounts for many of the changes
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 25 Mar 2006 12:57:09 +0000 |
parents | 5c6f9d27ea1c |
children | 973fccb59ea4 |
line wrap: on
line diff
--- a/scpmisc.c Fri Dec 09 06:10:27 2005 +0000 +++ b/scpmisc.c Sat Mar 25 12:57:09 2006 +0000 @@ -49,12 +49,12 @@ void *ptr; if (size == 0) { - fprintf(stderr, "xmalloc: zero size\n"); + printf( "xmalloc: zero size\n"); exit(EXIT_FAILURE); } ptr = malloc(size); if (ptr == NULL) { - fprintf(stderr, "xmalloc: out of memory (allocating %lu bytes)\n", (u_long) size); + printf( "xmalloc: out of memory (allocating %lu bytes)\n", (u_long) size); exit(EXIT_FAILURE); } return ptr; @@ -66,7 +66,7 @@ void *new_ptr; if (new_size == 0) { - fprintf(stderr, "xrealloc: zero size\n"); + printf( "xrealloc: zero size\n"); exit(EXIT_FAILURE); } if (ptr == NULL) @@ -74,7 +74,7 @@ else new_ptr = realloc(ptr, new_size); if (new_ptr == NULL) { - fprintf(stderr, "xrealloc: out of memory (new_size %lu bytes)\n", (u_long) new_size); + printf( "xrealloc: out of memory (new_size %lu bytes)\n", (u_long) new_size); exit(EXIT_FAILURE); } return new_ptr; @@ -84,7 +84,7 @@ xfree(void *ptr) { if (ptr == NULL) { - fprintf(stderr, "xfree: NULL pointer given as argument\n"); + printf( "xfree: NULL pointer given as argument\n"); exit(EXIT_FAILURE); } free(ptr);