Xinqi Bao's Git

shorter copyright notice and moved back VERSION and _GNU_SOURCE as the man page versi...
[slstatus.git] / slstatus.c
index 49b14de..fd27570 100644 (file)
@@ -88,10 +88,8 @@ smprintf(const char *fmt, ...)
        va_end(ap);
 
        ret = malloc(++len);
-       if (ret == NULL) {
-               warn("Malloc failed.");
-               return "n/a";
-       }
+       if (ret == NULL)
+               err(1, "malloc");
 
        va_start(ap, fmt);
        vsnprintf(ret, len, fmt, ap);
@@ -613,7 +611,7 @@ main(int argc, char *argv[])
                        oflag = 1;
                        break;
                case 'v':
-                       printf("%s version %s (c) 2016 slstatus engineers\n", argv0, VERSION);
+                       printf("slstatus %s (C) 2016 slstatus engineers\n", VERSION);
                        return 0;
                default:
                        usage();