]> git.refcnt.org Git - colorize.git/blobdiff - colorize.c
main(): amend wording of diagnostic
[colorize.git] / colorize.c
index b1d9ecc18d52c510f916f0620158386dce4dd8ea..608eb2fe06c89f96f4505b469e4d803237ae64b7 100644 (file)
@@ -383,8 +383,12 @@ main (int argc, char **argv)
 
 #if DEBUG
     log = open_file (DEBUG_FILE, "w");
-    STACK_FILE (log);
     print_tstamp (log);
+    /* We're in debugging mode, hence we can't invoke STACK_FILE()
+       prior to print_tstamp(), because both cause text to be written
+       to the same logfile which is expected to have the timestamp
+       first.  */
+    STACK_FILE (log);
 #endif
 
     attr[0] = '\0';
@@ -451,7 +455,7 @@ main (int argc, char **argv)
       {
         if (arg_cnt == 0 || arg_cnt > 2)
           {
-            vfprintf_diag ("%u arguments provided, expected 1-2 arguments or clean option", arg_cnt);
+            vfprintf_diag ("%u arguments provided, expected 1-2 arguments or --clean[-all]", arg_cnt);
             print_hint ();
             exit (EXIT_FAILURE);
           }
@@ -1927,7 +1931,8 @@ release (struct var_list *list, unsigned int stacked, void **ptr)
     for (i = 0; i < stacked; i++)
       {
         struct var_list *var = &list[i];
-        if (var->ptr == *ptr)
+        if (var->type != IS_UNUSED
+         && var->ptr == *ptr)
           {
             switch (var->type)
               {