]> git.ipfire.org Git - pakfire.git/commitdiff
config: Avoid updating line when it is never being read back
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 22 Oct 2024 15:03:14 +0000 (15:03 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 22 Oct 2024 15:03:14 +0000 (15:03 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/config.c

index 1c0b449e70c5b92b2499b1cba4797f9242d67a68..012044be835d411cfd9cfb1fa30204012f3e5859 100644 (file)
@@ -440,10 +440,8 @@ int pakfire_config_read(struct pakfire_config* config, FILE* f) {
 
                // Terminate line after comment sign
                char* comment = strchr(line, '#');
-               if (comment) {
+               if (comment)
                        *comment = '\0';
-                       length = comment - line;
-               }
 
                // Remove trailing space
                pakfire_string_rstrip(line);