]> git.refcnt.org Git - colorize.git/blobdiff - colorize.c
Minor tweaks
[colorize.git] / colorize.c
index 8d5ca90ff32b5bee5df1bcb2fbc2ece5da6e5395..b64be49b1b77672f72a4f4571d5593c16d10c5a5 100644 (file)
@@ -458,7 +458,7 @@ process_opt_attr (const char *p)
             unsigned int i;
             for (i = 0; i < sizeof (attrs) / sizeof (struct attr); i++)
               {
-                size_t name_len = strlen (attrs[i].name);
+                const size_t name_len = strlen (attrs[i].name);
                 if ((size_t)(p - s) == name_len && strneq (s, attrs[i].name, name_len))
                   {
                     write_attr (attrs[i].val, &attr_types, attrs[i].type, attrs[i].name);
@@ -768,15 +768,15 @@ skip_path_colors (const char *color_string, const char *file_string, const struc
 
     if (have_file)
       {
-        const char *file_exists = color_string;
+        const char *file_existing = color_string;
         if (file_string)
-          vfprintf_fail (formats[FMT_QUOTE], get_file_type (mode), file_exists, "cannot be used as color string");
+          vfprintf_fail (formats[FMT_QUOTE], get_file_type (mode), file_existing, "cannot be used as color string");
         else
           {
             if (VALID_FILE_TYPE (mode))
-              vfprintf_fail (formats[FMT_QUOTE], get_file_type (mode), file_exists, "must be preceded by color string");
+              vfprintf_fail (formats[FMT_QUOTE], get_file_type (mode), file_existing, "must be preceded by color string");
             else
-              vfprintf_fail (formats[FMT_QUOTE], get_file_type (mode), file_exists, "is not a valid file type");
+              vfprintf_fail (formats[FMT_QUOTE], get_file_type (mode), file_existing, "is not a valid file type");
           }
       }
 }
@@ -958,7 +958,7 @@ complete_part_line (const char *p, char **buf, FILE *stream)
             if (read_from_stream)
               save_char (ch, buf, &i, &size);
           }
-        else /* read next character */
+        else /* got next character */
           {
             got_next_char = true;
             break;