diff options
Diffstat (limited to 'FICS/utils.c')
-rw-r--r-- | FICS/utils.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/FICS/utils.c b/FICS/utils.c index 2861819..c5e3353 100644 --- a/FICS/utils.c +++ b/FICS/utils.c @@ -557,15 +557,15 @@ PUBLIC int printablestring(char *str) return 1; } -PUBLIC char *xstrdup(const char *str) +PUBLIC char * +xstrdup(const char *str) { - char *tmp; + char *out; - if (!str) - return NULL; - tmp = rmalloc(strlen(str) + 1); - strcpy(tmp, str); - return tmp; + if (str == NULL) + return NULL; + out = rmalloc(strlen(str) + 1); + return strcpy(out, str); } PUBLIC char *hms_desc(int t) |