From nobody Tue May 7 05:38:45 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591440439; cv=none; d=zohomail.com; s=zohoarc; b=BIbJYA8qbmWWX1/lrhvnlJ6iDEMZiS+MwylOqvAtttMJYI54ba49WIL8iL9KX6BpR0N7glmzVz0j8rUGO1ans7Q2LB0WM6nkGChsczU7yP23HJvqF8AS8vP9EyThi8unqHLgoQgLJ3RjjOF0BusbWuJ//Vc6AWNWy6zwni/NMUY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591440439; h=Content-Type:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=RvNBXcJ2A53x+/Hr9MdKT9StCDjvH2ngjiY67trZS4Y=; b=ZUCSSrpMQK3DOtvQCCucf3wcHzPSmZICxJSrT1HQzy48fhJt3BEt/Rddh4SGLfVEvMEdAWBidC+RsKC027hlfbSbhS3S+Z3l0KncE5xdR30acT8lD8Jz1ocGeBo0j7ga9O1EVL/8GnYP8rg0lG33EjndRPrusgiAod/ZMIc/Afc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 159144043892591.43372696562665; Sat, 6 Jun 2020 03:47:18 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-346-TyHepQFQOeat0lNhLXzfDw-1; Sat, 06 Jun 2020 06:47:14 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B45BF107ACCA; Sat, 6 Jun 2020 10:47:07 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B27B8891C9; Sat, 6 Jun 2020 10:47:04 +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 05A8C14CDC; Sat, 6 Jun 2020 10:46:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 056AkuJw016000 for ; Sat, 6 Jun 2020 06:46:58 -0400 Received: by smtp.corp.redhat.com (Postfix) id C5AE180561; Sat, 6 Jun 2020 10:46:56 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C147180566 for ; Sat, 6 Jun 2020 10:46:54 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CE5E0800294 for ; Sat, 6 Jun 2020 10:46:54 +0000 (UTC) Received: from huawei.com (szxga07-in.huawei.com [45.249.212.35]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-162-9lTCN8_BPki9sm86CPUgaQ-1; Sat, 06 Jun 2020 06:46:51 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 758DE9C93D027091958C for ; Sat, 6 Jun 2020 18:30:52 +0800 (CST) Received: from [10.173.222.155] (10.173.222.155) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Sat, 6 Jun 2020 18:30:44 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591440437; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=RvNBXcJ2A53x+/Hr9MdKT9StCDjvH2ngjiY67trZS4Y=; b=b8ttH0bzMe7361nsXdpyPNgv2fHSJVGGUctpJpw3YZXTSNvugbCcRXp1BdvE70bLV6tZg+ M6Gc5pJoxIMGECVm3Na0ZuRJ+VXgxU0EB9rIywaaTZ7mjA8Pb3a1gZNNees1Nsngh3gMWP 5tYbOoTEFAw0RnwUl2BpPFeEky9E20k= X-MC-Unique: TyHepQFQOeat0lNhLXzfDw-1 X-MC-Unique: 9lTCN8_BPki9sm86CPUgaQ-1 To: , , From: Bihong Yu Subject: bugifx: fix some wrong usage of ATTRIBUTE_NONNULL Message-ID: Date: Sat, 6 Jun 2020 18:30:44 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 Content-Language: en-US X-Originating-IP: [10.173.222.155] X-CFilter-Loop: Reflected X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/mixed; boundary="------------EF251943813200B8C8142072" X-Zoho-Virus-Status: 1 X-ZohoMail-DKIM: pass (identity @redhat.com) --------------EF251943813200B8C8142072 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 There are some wrong usage of ATTRIBUTE_NONNULL, which may cause the compil= ation fail. The ATTRIBUTE_NONNULL is the define of __attribute__((__nonnull__(m))), which d= eclares that the input pointer parameter of funciton should not be NULL. If we declare some = input pointer parameter of the function is ATTRIBUTE_NONNULL, the function should not red= undancy check of the pointer parameter. And the ATTRIBUTE_NONNULL can only be using to point= er. >From 55cd85345b2dc50f44c1e382563482d40142382b Mon Sep 17 00:00:00 2001 From: yubihong Date: Fri, 24 Apr 2020 17:44:43 +0800 Subject: [PATCH] qemu: fix code format problem Signed-off-by:Yu Bihong Reviewed-by: Daniel Henrique Barboza --- src/libvirt-domain.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index a12809c..d659f1b 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -8194,11 +8194,11 @@ virDomainAttachDevice(virDomainPtr domain, const ch= ar *xml) virCheckReadOnlyGoto(conn->flags, error); if (conn->driver->domainAttachDevice) { - int ret; - ret =3D conn->driver->domainAttachDevice(domain, xml); - if (ret < 0) - goto error; - return ret; + int ret; + ret =3D conn->driver->domainAttachDevice(domain, xml); + if (ret < 0) + goto error; + return ret; } virReportUnsupportedError(); @@ -8299,9 +8299,9 @@ virDomainDetachDevice(virDomainPtr domain, const char= *xml) if (conn->driver->domainDetachDevice) { int ret; ret =3D conn->driver->domainDetachDevice(domain, xml); - if (ret < 0) - goto error; - return ret; + if (ret < 0) + goto error; + return ret; } virReportUnsupportedError(); --=20 1.8.3.1 --------------EF251943813200B8C8142072 Content-Type: text/plain; charset="UTF-8"; name="qemu-fix-code-format-problem.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="qemu-fix-code-format-problem.patch" RnJvbSA1NWNkODUzNDViMmRjNTBmNDRjMWUzODI1NjM0ODJkNDAxNDIzODJiIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiB5dWJpaG9uZyA8eXViaWhvbmdAaHVhd2VpLmNvbT4KRGF0ZTog RnJpLCAyNCBBcHIgMjAyMCAxNzo0NDo0MyArMDgwMApTdWJqZWN0OiBbUEFUQ0hdIHFlbXU6IGZp eCBjb2RlIGZvcm1hdCBwcm9ibGVtCgpTaWduZWQtb2ZmLWJ5Oll1IEJpaG9uZyA8eXViaWhvbmdA aHVhd2VpLmNvbT4KLS0tCiBzcmMvbGlidmlydC1kb21haW4uYyB8IDE2ICsrKysrKysrLS0tLS0t LS0KIDEgZmlsZSBjaGFuZ2VkLCA4IGluc2VydGlvbnMoKyksIDggZGVsZXRpb25zKC0pCgpkaWZm IC0tZ2l0IGEvc3JjL2xpYnZpcnQtZG9tYWluLmMgYi9zcmMvbGlidmlydC1kb21haW4uYwppbmRl eCBhMTI4MDljLi5kNjU5ZjFiIDEwMDY0NAotLS0gYS9zcmMvbGlidmlydC1kb21haW4uYworKysg Yi9zcmMvbGlidmlydC1kb21haW4uYwpAQCAtODE5NCwxMSArODE5NCwxMSBAQCB2aXJEb21haW5B dHRhY2hEZXZpY2UodmlyRG9tYWluUHRyIGRvbWFpbiwgY29uc3QgY2hhciAqeG1sKQogICAgIHZp ckNoZWNrUmVhZE9ubHlHb3RvKGNvbm4tPmZsYWdzLCBlcnJvcik7CiAKICAgICBpZiAoY29ubi0+ ZHJpdmVyLT5kb21haW5BdHRhY2hEZXZpY2UpIHsKLSAgICAgICBpbnQgcmV0OwotICAgICAgIHJl dCA9IGNvbm4tPmRyaXZlci0+ZG9tYWluQXR0YWNoRGV2aWNlKGRvbWFpbiwgeG1sKTsKLSAgICAg ICBpZiAocmV0IDwgMCkKLSAgICAgICAgICBnb3RvIGVycm9yOwotICAgICAgIHJldHVybiByZXQ7 CisgICAgICAgIGludCByZXQ7CisgICAgICAgIHJldCA9IGNvbm4tPmRyaXZlci0+ZG9tYWluQXR0 YWNoRGV2aWNlKGRvbWFpbiwgeG1sKTsKKyAgICAgICAgaWYgKHJldCA8IDApCisgICAgICAgICAg ICBnb3RvIGVycm9yOworICAgICAgICByZXR1cm4gcmV0OwogICAgIH0KIAogICAgIHZpclJlcG9y dFVuc3VwcG9ydGVkRXJyb3IoKTsKQEAgLTgyOTksOSArODI5OSw5IEBAIHZpckRvbWFpbkRldGFj aERldmljZSh2aXJEb21haW5QdHIgZG9tYWluLCBjb25zdCBjaGFyICp4bWwpCiAgICAgaWYgKGNv bm4tPmRyaXZlci0+ZG9tYWluRGV0YWNoRGV2aWNlKSB7CiAgICAgICAgIGludCByZXQ7CiAgICAg ICAgIHJldCA9IGNvbm4tPmRyaXZlci0+ZG9tYWluRGV0YWNoRGV2aWNlKGRvbWFpbiwgeG1sKTsK LSAgICAgICAgIGlmIChyZXQgPCAwKQotICAgICAgICAgICAgIGdvdG8gZXJyb3I7Ci0gICAgICAg ICByZXR1cm4gcmV0OworICAgICAgICBpZiAocmV0IDwgMCkKKyAgICAgICAgICAgIGdvdG8gZXJy b3I7CisgICAgICAgIHJldHVybiByZXQ7CiAgICAgIH0KIAogICAgIHZpclJlcG9ydFVuc3VwcG9y dGVkRXJyb3IoKTsKLS0gCjEuOC4zLjEKCg== --------------EF251943813200B8C8142072--