From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E0BCC138350 for ; Wed, 22 Jan 2020 19:54:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8991FE0872; Wed, 22 Jan 2020 19:54:05 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5BAC8E086C for ; Wed, 22 Jan 2020 19:54:05 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DA14C34E37A for ; Wed, 22 Jan 2020 19:54:03 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 643E0D5 for ; Wed, 22 Jan 2020 19:54:02 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1579720692.107a164f604fd8ead594b3eaeea1840a3c84a157.grobian@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: / X-VCS-Repository: proj/portage-utils X-VCS-Files: qmerge.c X-VCS-Directories: / X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: 107a164f604fd8ead594b3eaeea1840a3c84a157 X-VCS-Branch: master Date: Wed, 22 Jan 2020 19:54:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: ff6d031e-a416-459f-b715-efb9f78d5c6d X-Archives-Hash: 6d935ce7c067648c49734e7c6e215f31 commit: 107a164f604fd8ead594b3eaeea1840a3c84a157 Author: Fabian Groffen gentoo org> AuthorDate: Wed Jan 22 19:18:12 2020 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Wed Jan 22 19:18:12 2020 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=107a164f qmerge: fix Coverity 125890 Unchecked return value Signed-off-by: Fabian Groffen gentoo.org> qmerge.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qmerge.c b/qmerge.c index 6988285..f2ef84d 100644 --- a/qmerge.c +++ b/qmerge.c @@ -1671,7 +1671,10 @@ pkg_fetch(int level, const depend_atom *atom, const struct pkg_t *pkg) unlink_empty(buf); snprintf(str, sizeof(str), "%s/%s", pkgdir, pkg->CATEGORY); - mkdir(str, 0755); + if (mkdir(str, 0755) == -1) { + warn("Failed to create %s", str); + return; + } /* XXX: should do a size check here for partial downloads */