From: Michael Tremer Date: Wed, 9 Oct 2024 13:06:56 +0000 (+0000) Subject: file: Don't declare hardlink in the switch statement X-Git-Tag: 0.9.30~1120 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b907387f41510b45697c5033bb62f74f914892d;p=pakfire.git file: Don't declare hardlink in the switch statement Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/file.c b/src/libpakfire/file.c index c60a1e439..7dbde5b30 100644 --- a/src/libpakfire/file.c +++ b/src/libpakfire/file.c @@ -561,6 +561,7 @@ int pakfire_file_set_flags(struct pakfire_file* file, int flag) { __pakfire_file_strmode(file, buffer, sizeof(buffer)) static int __pakfire_file_strmode(struct pakfire_file* file, char* s, const size_t length) { + const char* hardlink = NULL; int r; static const mode_t permbits[] = { @@ -613,7 +614,7 @@ static int __pakfire_file_strmode(struct pakfire_file* file, char* s, const size break; default: - const char* hardlink = pakfire_file_get_hardlink(file); + hardlink = pakfire_file_get_hardlink(file); if (hardlink) { s[0] = 'h';