]> git.sur5r.net Git - i3/i3status/blobdiff - i3status.c
Fix error messages
[i3/i3status] / i3status.c
index c6043201d5500419b684d973cbd7a95c4ea82b3f..da4bc78828ce65f4327bd2319b98581ca22ab2c1 100644 (file)
@@ -44,7 +44,8 @@
     CFG_STR_CB("align", NULL, CFGF_NONE, parse_align)
 
 #define CFG_COLOR_OPTS(good, degraded, bad)             \
-    CFG_STR("color_good", good, CFGF_NONE),             \
+    CFG_STR("color_good", good, CFGF_NONE)              \
+    ,                                                   \
         CFG_STR("color_degraded", degraded, CFGF_NONE), \
         CFG_STR("color_bad", bad, CFGF_NONE)
 
@@ -226,9 +227,10 @@ static char *resolve_tilde(const char *path) {
     } else {
         head = globbuf.gl_pathv[0];
         result = scalloc(strlen(head) + (tail ? strlen(tail) : 0) + 1);
-        strncpy(result, head, strlen(head));
-        if (tail)
-            strncat(result, tail, strlen(tail));
+        strcpy(result, head);
+        if (tail) {
+            strcat(result, tail);
+        }
     }
     globfree(&globbuf);
 
@@ -664,7 +666,7 @@ int main(int argc, char *argv[]) {
 
     while (1) {
         if (exit_upon_signal) {
-            fprintf(stderr, "Exiting due to signal.\n");
+            fprintf(stderr, "i3status: exiting due to signal.\n");
             exit(1);
         }
         struct timeval tv;