lib/repo.c: CID 62671 (unchecked return value)

This commit is contained in:
Juan RP 2014-10-05 12:22:18 +02:00
parent 616af5c207
commit 66292180a3

View File

@ -509,10 +509,10 @@ xbps_repo_key_import(struct xbps_repo *repo)
dbkeyd = dirname(p); dbkeyd = dirname(p);
assert(dbkeyd); assert(dbkeyd);
if (access(dbkeyd, R_OK|W_OK) == -1) { if (access(dbkeyd, R_OK|W_OK) == -1) {
if (errno == ENOENT) { rv = errno;
xbps_mkpath(dbkeyd, 0755); if (rv == ENOENT)
} else { rv = xbps_mkpath(dbkeyd, 0755);
rv = errno; if (rv != 0) {
xbps_dbg_printf(repo->xhp, xbps_dbg_printf(repo->xhp,
"[repo] `%s' cannot create %s: %s\n", "[repo] `%s' cannot create %s: %s\n",
repo->uri, dbkeyd, strerror(errno)); repo->uri, dbkeyd, strerror(errno));