From nobody Sun May 5 21:49:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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 (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1573578285; cv=none; d=zoho.com; s=zohoarc; b=NrepVKYVxvPyCNHeQaJJXczXs5ovwrGImAqw/I7PGHVjyxlAajavulBGAKjV9YatYz48d57RbrEYxzZSOoRvWvsuNhllkxGN9v+oOifz9gwmwVW8ob+oUoj/k2MyF6q8uSgb+QwhlDC60U59DGunX7WKb0dBwa/PefpG2G6iHEY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573578285; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=szMv4kL67oOmmqpunD5zeTLrGeJT6iiogR+k6MmZPRk=; b=dVLW3Rb6DkJA8oSmRecEnVKmj+3N6KpXngd+wGMDmOkjJPOKmdEofeLNtVmlmAbSf5/iogIFQ51G+jqpjx/7eSHThZqr7Vq6KnFxynSoMgf2xg4DwrbDOQ+cABd7ccekBWlvHfq5uRFUXErhfVsEE6yWrxul/WBtQSKLDW35RVk= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1573578285571322.3405480358392; Tue, 12 Nov 2019 09:04:45 -0800 (PST) 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-264-DSd8NVegPdi2cfyRueXZCg-1; Tue, 12 Nov 2019 12:04:42 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2268910C5652; Tue, 12 Nov 2019 17:04:36 +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 E91396025E; Tue, 12 Nov 2019 17:04:35 +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 90C7A182B012; Tue, 12 Nov 2019 17:04:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xACH4YKl012706 for ; Tue, 12 Nov 2019 12:04:34 -0500 Received: by smtp.corp.redhat.com (Postfix) id 05D0628DDE; Tue, 12 Nov 2019 17:04:34 +0000 (UTC) Received: from icr.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8448328DDB for ; Tue, 12 Nov 2019 17:04:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573578284; 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: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=szMv4kL67oOmmqpunD5zeTLrGeJT6iiogR+k6MmZPRk=; b=J9Qfk3Zl76Kaqthuxp2MX7iZRbfuUCIKh42RfKKVMPPAr9JaTvLmp6QX1eKYyOEGptF3pk F6q1GazJw1rCAOaT8fqxuUDXde0+apsg5e53peuRCzMNund644eYbO+t5I3BxSuBytN2xx 4kP8C4cN4M7vrUjYDUGTJ/n1nP/Bg1M= From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 12 Nov 2019 18:04:25 +0100 Message-Id: <13c957edf163f0604569f0dfae4f58cadba017ed.1573578242.git.jtomko@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCHv2] conf: remove NULL check from virDomainQemuMonitorEventNew 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.12 X-MC-Unique: DSd8NVegPdi2cfyRueXZCg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The qemu_domain_monitor_event_msg struct in qemu_protocol.x defines event as a nonnull_string and qemuMonitorJSONIOProcessEvent also errors out on a non-NULL event. Drop the check completely. This essentially reverts commit d343e8203d248635f5e7a0d86dd077f74d49e3af Signed-off-by: J=C3=A1n Tomko Reviewed-by: Michal Privoznik --- src/conf/domain_event.c | 12 ------------ src/conf/domain_event.h | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/conf/domain_event.c b/src/conf/domain_event.c index 900d8f745e..33fbf10406 100644 --- a/src/conf/domain_event.c +++ b/src/conf/domain_event.c @@ -1934,24 +1934,12 @@ virDomainQemuMonitorEventNew(int id, 0, id, name, uuid, uuidstr))) return NULL; =20 - /* event is mandatory, details are optional */ - if (!event) { - virReportError(VIR_ERR_INVALID_ARG, - _("unexpected event=3DNULL name=3D%s uuid=3D%s deta= ils=3D%s"), - name, uuidstr, NULLSTR(details)); - goto error; - } - ev->event =3D g_strdup(event); ev->seconds =3D seconds; ev->micros =3D micros; ev->details =3D g_strdup(details); =20 return (virObjectEventPtr)ev; - - error: - virObjectUnref(ev); - return NULL; } =20 =20 diff --git a/src/conf/domain_event.h b/src/conf/domain_event.h index 0a4bce3d04..d1cfb81d62 100644 --- a/src/conf/domain_event.h +++ b/src/conf/domain_event.h @@ -321,4 +321,4 @@ virDomainQemuMonitorEventNew(int id, long long seconds, unsigned int micros, const char *details) - ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); + ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4); --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list