diff options
author | John Kohl <jtkohl@mit.edu> | 1987-07-01 00:22:00 +0000 |
---|---|---|
committer | John Kohl <jtkohl@mit.edu> | 1987-07-01 00:22:00 +0000 |
commit | 16c212f1ed318b91dc9a6791d97dc2a7510f0511 (patch) | |
tree | 24d9beea10800a5793f0b6074faa8183761a46ed /server/common.c | |
parent | dd77ea1a1d40e766805e45137e707691d0df17ed (diff) |
lint cleanup
Diffstat (limited to 'server/common.c')
-rw-r--r-- | server/common.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/server/common.c b/server/common.c index a42ecfe..b7f9122 100644 --- a/server/common.c +++ b/server/common.c @@ -14,21 +14,30 @@ #include <zephyr/mit-copyright.h> #ifndef lint +#ifndef SABER static char rcsid_common_c[] = "$Header$"; +#endif SABER #endif lint #include <stdio.h> +#include <syslog.h> + +extern char *malloc(), *strcpy(); /* common routines for the server */ char * -strsave(sp) char *sp; +strsave(sp) +char *sp; { register char *ret; - if((ret = (char *) malloc(strlen(sp)+1)) == NULL) - return(NULL); - strcpy(ret,sp); + if((ret = malloc((unsigned) strlen(sp)+1)) == NULL) { + syslog(LOG_ERR, "no mem strsave'ing"); + abort(); + } + (void) strcpy(ret,sp); return(ret); } +/* some sort of syslog interface */ |