braces for one line statements in smprintf()

This commit is contained in:
Aaron Marcher 2016-09-18 22:01:44 +02:00 committed by Aaron Marcher (drkhsh)
parent bad8dc682d
commit c5ace949e4
1 changed files with 2 additions and 1 deletions

View File

@ -88,8 +88,9 @@ smprintf(const char *fmt, ...)
va_end(ap);
ret = malloc(++len);
if (ret == NULL)
if (ret == NULL) {
err(1, "malloc");
}
va_start(ap, fmt);
vsnprintf(ret, len, fmt, ap);