From: Michael Tremer Date: Tue, 22 Oct 2024 15:03:14 +0000 (+0000) Subject: config: Avoid updating line when it is never being read back X-Git-Tag: 0.9.30~954 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a868574d2dbbb2cb263e88848fa4f4eb7bdcd515;p=pakfire.git config: Avoid updating line when it is never being read back Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/config.c b/src/libpakfire/config.c index 1c0b449e7..012044be8 100644 --- a/src/libpakfire/config.c +++ b/src/libpakfire/config.c @@ -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);