]> git.refcnt.org Git - colorize.git/blobdiff - colorize.c
Extend fixed space of attr[]
[colorize.git] / colorize.c
index 8e31f5cf53d5f66473a1d75f049bc3d263d2406b..3e9755af4fd5667bccf26caa8622660906ecd749 100644 (file)
 
 #define DEBUG_FILE "debug.txt"
 
-#define MAX_ATTRIBUTE_CHARS (5 * 2)
+#define MAX_ATTRIBUTE_CHARS (6 * 2)
 
-#define VERSION "0.61"
+#define VERSION "0.62"
 
 typedef enum { false, true } bool;
 
@@ -474,6 +474,7 @@ process_opt_attr (const char *p)
                 strncpy (attr_invalid, s, p - s);
                 attr_invalid[p - s] = '\0';
                 vfprintf_fail ("--attr switch attribute '%s' is not valid", attr_invalid);
+                RELEASE_VAR (attr_invalid); /* never reached */
               }
           }
         if (*p)
@@ -538,13 +539,11 @@ print_help (void)
         const char *short_opt = NULL;
         unsigned int i;
         for (i = 0; i < sizeof (short_opts) / sizeof (struct short_opt); i++)
-          {
-            if (streq (opt->name, short_opts[i].name))
-              {
-                short_opt = short_opts[i].short_opt;
-                break;
-              }
-          }
+          if (streq (opt->name, short_opts[i].name))
+            {
+              short_opt = short_opts[i].short_opt;
+              break;
+            }
         if (short_opt)
           printf ("\t\t-%s, --%s\n", short_opt, opt->name);
         else