Merge pull request #1208 from kernelkit/coverity-fixes

This commit is contained in:
Mattias Walström
2025-10-25 17:32:45 +02:00
committed by GitHub
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -316,7 +316,7 @@ static int copy(const char *src, const char *dst, const char *remote_user)
else {
snprintf(adjust, sizeof(adjust), "/tmp/%s.cfg", srcds->name);
fn = tmpfn = adjust;
remove(tmpfn);
(void)remove(tmpfn);
rc = systemf("sysrepocfg -d %s -X%s -f json", srcds->sysrepocfg, fn);
}
@@ -378,7 +378,7 @@ static int copy(const char *src, const char *dst, const char *remote_user)
}
snprintf(adjust, sizeof(adjust), "/tmp/%s", fn);
fn = tmpfn = adjust;
remove(tmpfn);
(void)remove(tmpfn);
} else {
fn = cfg_adjust(src, NULL, adjust, sizeof(adjust), sanitize);
if (!fn) {
+1 -1
View File
@@ -128,7 +128,7 @@ char *cfg_adjust(const char *fn, const char *tmpl, char *buf, size_t len, int sa
}
/* If file exists, resolve symlinks and verify still in whitelist */
if (!access(fn, F_OK) && realpath(fn, resolved)) {
if (realpath(fn, resolved)) {
if (!path_allowed(resolved))
return NULL;
fn = resolved;