]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
main: rename remaining_command_line to remaining_file_contents
authorRay Strode <rstrode@redhat.com>
Mon, 9 Apr 2012 18:34:46 +0000 (14:34 -0400)
committerRay Strode <rstrode@redhat.com>
Mon, 9 Apr 2012 18:34:46 +0000 (14:34 -0400)
add_consoles_from_file suffers from a sever case of
cut-and-paste-itis.  This commit renames its variable
"remaining_command_line" to "remaining_file_contents" so that
the variable name actually makes sense.

src/main.c

index 250e7fba407b757408062a262b1add3bab616fd1..13d5f592185f6d9b59ed2017445cd2c84aa4e91d 100644 (file)
@@ -1879,7 +1879,7 @@ add_consoles_from_file (state_t         *state,
 {
   int fd;
   char contents[512] = "";
-  const char *remaining_command_line;
+  const char *remaining_file_contents;
   char *console;
 
   ply_trace ("opening %s", path);
@@ -1900,23 +1900,23 @@ add_consoles_from_file (state_t         *state,
     }
   close (fd);
 
-  remaining_command_line = contents;
+  remaining_file_contents = contents;
 
   console = NULL;
-  while (remaining_command_line != '\0')
+  while (remaining_file_contents != '\0')
     {
       char *end;
       char *console_device;
 
-      console = strdup (remaining_command_line);
-      remaining_command_line += strlen (console);
+      console = strdup (remaining_file_contents);
+      remaining_file_contents += strlen (console);
 
       end = strpbrk (console, " ");
 
       if (end != NULL)
         {
           *end = '\0';
-          remaining_command_line++;
+          remaining_file_contents++;
         }
 
       if (console[0] == '\0')