mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-08 14:48:01 +02:00
main: rename remaining_command_line to remaining_file_contents
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.
This commit is contained in:
parent
955534e18f
commit
d4267ec71a
1 changed files with 6 additions and 6 deletions
12
src/main.c
12
src/main.c
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue