braces for one line statements in smprintf()
Aaron Marcher info@nulltime.net
Sun, 18 Sep 2016 22:01:44 +0200
1 files changed,
2 insertions(+),
1 deletions(-)
jump to
M
slstatus.c
→
slstatus.c
@@ -88,8 +88,9 @@ len = vsnprintf(NULL, 0, fmt, ap);
va_end(ap); ret = malloc(++len); - if (ret == NULL) + if (ret == NULL) { err(1, "malloc"); + } va_start(ap, fmt); vsnprintf(ret, len, fmt, ap);