X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=i3status.c;h=b83b1f3ab0660082bf2ef720638a32d06f4ead0c;hb=0b8aa86ecbec930ef0315bc4627c0f48966769d2;hp=c6043201d5500419b684d973cbd7a95c4ea82b3f;hpb=302966374bd7d9ca5b97171cedd3613ae10360c8;p=i3%2Fi3status diff --git a/i3status.c b/i3status.c index c604320..b83b1f3 100644 --- a/i3status.c +++ b/i3status.c @@ -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);