JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
removing NULL-terminating **tags definition in config.h
authorAnselm R. Garbe <garbeam@gmail.com>
Fri, 5 Oct 2007 16:30:01 +0000 (18:30 +0200)
committerAnselm R. Garbe <garbeam@gmail.com>
Fri, 5 Oct 2007 16:30:01 +0000 (18:30 +0200)
config.def.h
dwm.c

index f7822d2..5a18854 100644 (file)
@@ -12,7 +12,7 @@
 #define SELFGCOLOR             "#ffffff"
 
 /* tagging */
-const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "www", NULL };
+const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "www" };
 Rule rules[] = {
        /* class:instance:title regex   tags regex      isfloating */
        { "Firefox",                    "www",          False },
diff --git a/dwm.c b/dwm.c
index 6a21d3f..c9495ec 100644 (file)
--- a/dwm.c
+++ b/dwm.c
@@ -1467,7 +1467,7 @@ setup(void) {
 
        /* init tags */
        compileregs();
-       for(ntags = 0; tags[ntags]; ntags++);
+       ntags = sizeof tags / sizeof tags[0];
        seltags = emallocz(sizeof(Bool) * ntags);
        seltags[0] = True;