Explorar o código

do not exit on failed smprintf

Aaron Marcher %!s(int64=9) %!d(string=hai) anos
pai
achega
db07244cb8
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      slstatus.c

+ 1 - 1
slstatus.c

@@ -90,7 +90,7 @@ smprintf(const char *fmt, ...)
 	ret = malloc(++len);
 	if (ret == NULL) {
 		warn("Malloc failed.");
-		exit(1);
+		return "n/a";
 	}
 
 	va_start(ap, fmt);