aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornoname <noname@inventati.org>2014-04-22 21:59:48 +0400
committerRoberto E. Vargas Caballero <k0ga@shike2.com>2014-04-23 15:39:04 +0200
commitfa19f241a34deddf6e089ab462cbd9cb02f61b3d (patch)
tree7d6392042c482b0e95d75af971a4c2de59162d0f
parentdf1810dd8fcb7a14f4cd2ff2ec3ce8780591f87f (diff)
downloadst-fa19f241a34deddf6e089ab462cbd9cb02f61b3d.tar.gz
st-fa19f241a34deddf6e089ab462cbd9cb02f61b3d.zip
Make xrealloc and xstrdup style consistent.
-rw-r--r--st.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/st.c b/st.c
index bb3e687..aba034f 100644
--- a/st.c
+++ b/st.c
@@ -549,12 +549,10 @@ xrealloc(void *p, size_t len) {
549 549
550char * 550char *
551xstrdup(char *s) { 551xstrdup(char *s) {
552 char *p = strdup(s); 552 if((s = strdup(s)) == NULL)
553
554 if (!p)
555 die("Out of memory\n"); 553 die("Out of memory\n");
556 554
557 return p; 555 return s;
558} 556}
559 557
560size_t 558size_t