Xinqi Bao's Git
projects
/
slstatus.git
/ commitdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
2fdb2ed
)
do not exit on failed smprintf
author
Aaron Marcher <
[email protected]
>
Sun, 18 Sep 2016 14:54:46 +0000
(16:54 +0200)
committer
Aaron Marcher (drkhsh) <
[email protected]
>
Sun, 18 Sep 2016 14:54:46 +0000
(16:54 +0200)
slstatus.c
patch
|
blob
|
history
diff --git
a/slstatus.c
b/slstatus.c
index
4a092af
..
fa12572
100644
(file)
--- a/
slstatus.c
+++ b/
slstatus.c
@@
-90,7
+90,7
@@
smprintf(const char *fmt, ...)
ret = malloc(++len);
if (ret == NULL) {
warn("Malloc failed.");
ret = malloc(++len);
if (ret == NULL) {
warn("Malloc failed.");
-
exit(1)
;
+
return "n/a"
;
}
va_start(ap, fmt);
}
va_start(ap, fmt);