logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>
commit: f9cf916e5eabcddafc321f5b458b52321d4d4e69
parent 133c05426c2133c60bdb0b42c1dda64b3bc6bb7d
Author: Gábor Stefanik <netrolller.3d@gmail.com>
Date:   Mon,  1 Jan 2024 22:13:49 +0100

Fix uninitialized variables in script-generator

Diffstat:

Mseed/script-generator.c4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/seed/script-generator.c b/seed/script-generator.c @@ -168,7 +168,7 @@ void output_config(FILE *out) { char *get_var(char *name) { /* Search through existing variables. */ Variable *var; - Variable *last; + Variable *last = NULL; for (var = variables; var != NULL; var = var->next) { if (strcmp(name, var->name) == 0) { return var->val; @@ -373,7 +373,7 @@ int interpret(Directive *directive) { Directive *interpreter(Directive *directives) { Directive *directive; - Directive *last; + Directive *last = NULL; for (directive = directives; directive != NULL; directive = directive->next) { if (interpret(directive)) { /* This means this directive needs to be removed from the linked list. */