From nobody Mon Feb 9 01:20:55 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1564174612; cv=none; d=zoho.com; s=zohoarc; b=b+RIjOwe3/HOKz59nPReLlckaTrkVzFeYPr+8PKCuK6Q46MIj/48Sq4T8Qsmypx0bEGjPhXuVcifSYbkaGfluZBUouOESnKWO6GYsSw0Db27Tmg13OILLjLhip/QlVVD7YpMcXf/vFxuqFty1UmEzSOZIiajp7z40LGTBib2VnU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564174612; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=DDph8WXGbkPliEoH39w5HYyJ19xwkpOeS1FnFTgMyzE=; b=EX3ib5I85bMdFHAkNs5NigiXV1+X4+SPZqTBI6weSi6GLk2kJUUeoDt98RaXL64CDTZtA04bdaapYGMQ1DoKYMcKlmvD0QEa3BuiBgoOJg4Kij83frXl6IgsDSiEcLUhyZu2+ozLyTPLMDBuYyYE1hhZWi6nICUBwBdP0Bfw1OQ= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1564174612047887.2403401819643; Fri, 26 Jul 2019 13:56:52 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5478F3071D7E; Fri, 26 Jul 2019 20:56:45 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D9E5A17AF7; Fri, 26 Jul 2019 20:56:44 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 383B618045CE; Fri, 26 Jul 2019 20:56:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x6QKuf54031553 for ; Fri, 26 Jul 2019 16:56:42 -0400 Received: by smtp.corp.redhat.com (Postfix) id E7E8A1001B32; Fri, 26 Jul 2019 20:56:41 +0000 (UTC) Received: from mx1.redhat.com (ext-mx06.extmail.prod.ext.phx2.redhat.com [10.5.110.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B3E011001B07; Fri, 26 Jul 2019 20:56:39 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 81732369AC; Fri, 26 Jul 2019 20:56:37 +0000 (UTC) Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x6QKqmMM001933; Fri, 26 Jul 2019 16:56:37 -0400 Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0b-001b2d01.pphosted.com with ESMTP id 2u06sgduev-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jul 2019 16:56:36 -0400 Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x6QKtUiO008572; Fri, 26 Jul 2019 20:56:36 GMT Received: from b01cxnp22033.gho.pok.ibm.com (b01cxnp22033.gho.pok.ibm.com [9.57.198.23]) by ppma05wdc.us.ibm.com with ESMTP id 2tymfe1253-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jul 2019 20:56:36 +0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x6QKuZfi39649638 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 26 Jul 2019 20:56:35 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CBFFBAE05C; Fri, 26 Jul 2019 20:56:35 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BE461AE060; Fri, 26 Jul 2019 20:56:35 +0000 (GMT) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP; Fri, 26 Jul 2019 20:56:35 +0000 (GMT) From: Stefan Berger To: libvir-list@redhat.com, jferlan@redhat.com Date: Fri, 26 Jul 2019 16:56:32 -0400 Message-Id: <20190726205633.2041912-4-stefanb@linux.vnet.ibm.com> In-Reply-To: <20190726205633.2041912-1-stefanb@linux.vnet.ibm.com> References: <20190726205633.2041912-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-07-26_15:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1907260236 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 238 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 26 Jul 2019 20:56:37 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 26 Jul 2019 20:56:37 +0000 (UTC) for IP:'148.163.158.5' DOMAIN:'mx0b-001b2d01.pphosted.com' HELO:'mx0a-001b2d01.pphosted.com' FROM:'stefanb@linux.vnet.ibm.com' RCPT:'' X-RedHat-Spam-Score: -0.698 (RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE) 148.163.158.5 mx0b-001b2d01.pphosted.com 148.163.158.5 mx0b-001b2d01.pphosted.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.30 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Stefan Berger Subject: [libvirt] [PATCH v2 3/4] utils: Remove ATTRIBUTE_NONNULL(1) from virCommandSetSendBuffer X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Fri, 26 Jul 2019 20:56:50 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Remove the ATTRIBUTE_NONNULL(1) from virCommandSetSendBuffer() prototype since we are checking for '!cmd' and move the initialization if 'i' after the test for '!cmd'. Signed-off-by: Stefan Berger Reviewed-by: John Ferlan --- src/util/vircommand.c | 3 ++- src/util/vircommand.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/util/vircommand.c b/src/util/vircommand.c index 774038e536..2df71014f8 100644 --- a/src/util/vircommand.c +++ b/src/util/vircommand.c @@ -1775,7 +1775,7 @@ virCommandSetSendBuffer(virCommandPtr cmd, int fd, unsigned char *buffer, size_t buflen) { - size_t i =3D virCommandGetNumSendBuffers(cmd); + size_t i; =20 if (!cmd || cmd->has_error) return -1; @@ -1787,6 +1787,7 @@ virCommandSetSendBuffer(virCommandPtr cmd, return -1; } =20 + i =3D virCommandGetNumSendBuffers(cmd); if (VIR_REALLOC_N(cmd->sendBuffers, i + 1) < 0) { cmd->has_error =3D ENOMEM; return -1; diff --git a/src/util/vircommand.h b/src/util/vircommand.h index c2abc7b2c3..74574e3fb1 100644 --- a/src/util/vircommand.h +++ b/src/util/vircommand.h @@ -149,7 +149,7 @@ void virCommandSetWorkingDirectory(virCommandPtr cmd, int virCommandSetSendBuffer(virCommandPtr cmd, int fd, unsigned char *buffer, size_t buflen) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3); + ATTRIBUTE_NONNULL(3); =20 void virCommandSetInputBuffer(virCommandPtr cmd, const char *inbuf) ATTRIBUTE_NONNULL(2); --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list