aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2023-12-10 01:57:33 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2023-12-10 01:57:33 +0100
commitc58c668b24b0ceb02fa73012342aa822df3efb6c (patch)
tree24d583eb89216b2d9c3dda7a21a55d8a331761c8 /FICS
parentba613d77ff371096e95274ef55bfa6b637f18ea2 (diff)
Changed xstrdup()
Diffstat (limited to 'FICS')
-rw-r--r--FICS/utils.c14
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)