pinosaur
/
st.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df1810d
)
Make xrealloc and xstrdup style consistent.
author
noname
<noname@inventati.org>
Tue, 22 Apr 2014 17:59:48 +0000
(21:59 +0400)
committer
Roberto E. Vargas Caballero
<k0ga@shike2.com>
Wed, 23 Apr 2014 13:39:04 +0000
(15:39 +0200)
st.c
patch
|
blob
|
history
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