st
simple terminal
git clone https://9o.is/git/st.git
commit 7da4c0b49ceabc349d171f0bcfcc2bea6a2e9b5c parent f2e4315d93d4a2f8e8fbdc85d59f0061f38c4770 Author: noname <noname@inventati.org> Date: Tue, 22 Apr 2014 21:59:48 +0400 Make xrealloc and xstrdup style consistent. Diffstat:
| M | st.c | | | 6 | ++---- |
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git 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