JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
Make xrealloc and xstrdup style consistent.
[st.git] / st.c
diff --git a/st.c b/st.c
index bb3e687..aba034f 100644 (file)
--- a/st.c
+++ b/st.c
@@ -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