diff options
author | noname <noname@inventati.org> | 2014-04-22 21:59:48 +0400 |
---|---|---|
committer | Roberto E. Vargas Caballero <k0ga@shike2.com> | 2014-04-23 15:39:04 +0200 |
commit | fa19f241a34deddf6e089ab462cbd9cb02f61b3d (patch) | |
tree | 7d6392042c482b0e95d75af971a4c2de59162d0f | |
parent | df1810dd8fcb7a14f4cd2ff2ec3ce8780591f87f (diff) |
Make xrealloc and xstrdup style consistent.
-rw-r--r-- | st.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -549,12 +549,10 @@ xrealloc(void *p, size_t len) { char * xstrdup(char *s) { - char *p = strdup(s); - - if (!p) + if((s = strdup(s)) == NULL) die("Out of memory\n"); - return p; + return s; } size_t |