diff --git a/src/bin/copy.c b/src/bin/copy.c index bc3d14cd7..945affe4c 100644 --- a/src/bin/copy.c +++ b/src/bin/copy.c @@ -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) { diff --git a/src/bin/util.c b/src/bin/util.c index 629ecfde1..6432bf776 100644 --- a/src/bin/util.c +++ b/src/bin/util.c @@ -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;