Skip to content

Commit 3384507

Browse files
authored
Merge pull request #1208 from kernelkit/coverity-fixes
2 parents 171b757 + b7d91e4 commit 3384507

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/bin/copy.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ static int copy(const char *src, const char *dst, const char *remote_user)
316316
else {
317317
snprintf(adjust, sizeof(adjust), "/tmp/%s.cfg", srcds->name);
318318
fn = tmpfn = adjust;
319-
remove(tmpfn);
319+
(void)remove(tmpfn);
320320
rc = systemf("sysrepocfg -d %s -X%s -f json", srcds->sysrepocfg, fn);
321321
}
322322

@@ -378,7 +378,7 @@ static int copy(const char *src, const char *dst, const char *remote_user)
378378
}
379379
snprintf(adjust, sizeof(adjust), "/tmp/%s", fn);
380380
fn = tmpfn = adjust;
381-
remove(tmpfn);
381+
(void)remove(tmpfn);
382382
} else {
383383
fn = cfg_adjust(src, NULL, adjust, sizeof(adjust), sanitize);
384384
if (!fn) {

src/bin/util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ char *cfg_adjust(const char *fn, const char *tmpl, char *buf, size_t len, int sa
128128
}
129129

130130
/* If file exists, resolve symlinks and verify still in whitelist */
131-
if (!access(fn, F_OK) && realpath(fn, resolved)) {
131+
if (realpath(fn, resolved)) {
132132
if (!path_allowed(resolved))
133133
return NULL;
134134
fn = resolved;

0 commit comments

Comments
 (0)