From nobody Sun Feb 8 21:33:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1691059005; cv=none; d=zohomail.com; s=zohoarc; b=kN8Lati+Wc4uJ6YCPzJsQSiBiyZ+6vSoQti+TZWl273K1QrD61mlneMrvKfQeWbR4u6IDtmkuZnwG4U838yIJVLapyTxMnyzwTXqeaRZWz/xqN9AWuu7DKtEeHWZ4lOwa3yxHOGfZIAzL+fFuK+auCsJrZ/9FxcETA72FKSNft0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1691059005; h=Content-Type:Content-Transfer-Encoding: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; bh=o5/7q1sK5qhN63b7KajC9W6+R8HLwfGl+8//AvpV46w=; b=TETAr7bGCFRE/yYm65w9x6mn5AMdZPNOhO1J2ylpVRQwnFQkQb2YrnljkZfVaWP4qp7fvSr5Xc/a/6bUYcRYsjo8CLsA8lR1wZeqN9JB2vNejNIchHi1NYJYR7+rX5AfxJiTW7fxqgvFV3zM3ZvsDktQ9flFyj195EG6AL4zFvQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1691059005985459.7982491614441; Thu, 3 Aug 2023 03:36:45 -0700 (PDT) Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-659-vMLhg-lpPqqQ9Y2mO-KMpw-1; Thu, 03 Aug 2023 06:36:41 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3FA3D1C060DD; Thu, 3 Aug 2023 10:36:39 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 28C8240C6CCC; Thu, 3 Aug 2023 10:36:39 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 1C6FB194723E; Thu, 3 Aug 2023 10:36:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 41D2E1947218 for ; Thu, 3 Aug 2023 10:36:28 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 26708F7FB4; Thu, 3 Aug 2023 10:36:28 +0000 (UTC) Received: from localhost.localdomain (unknown [10.43.2.36]) by smtp.corp.redhat.com (Postfix) with ESMTP id C1C61F7FB8 for ; Thu, 3 Aug 2023 10:36:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1691059005; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=o5/7q1sK5qhN63b7KajC9W6+R8HLwfGl+8//AvpV46w=; b=OHgAFhZj20X98WgVknruid9iAMaKg2CoeBeq47ITy8v88Sz95+6shjow76l0HZDjs/HGDL j7KmetkuaEgJXx2MpDwR8pzQrWZJeap8i/Tv39j9QIgJWPDhYER8X5NQYR7VHUaw4UzdtS fTDoTpuLHedJoNrDm5uF00Hs1Z+UJWE= X-MC-Unique: vMLhg-lpPqqQ9Y2mO-KMpw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 09/13] virnetclient: Update comment about memset() Date: Thu, 3 Aug 2023 12:36:16 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1691059008183100009 Content-Type: text/plain; charset="utf-8"; x-default="true" Instead of suggesting to zero structs out using memset() we should suggest initializing structs with zero initializer. Signed-off-by: Michal Privoznik Reviewed-by: Claudio Fontana --- src/rpc/virnetclient.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c index df2958935b..18f87653f5 100644 --- a/src/rpc/virnetclient.c +++ b/src/rpc/virnetclient.c @@ -1857,8 +1857,8 @@ static void virNetClientIOUpdateCallback(virNetClient= *client, * which come from the user). It does however free any intermediate * results, eg. the error structure if there is one. * - * NB(2). Make sure to memset (&ret, 0, sizeof(ret)) before calling, - * else Bad Things will happen in the XDR code. + * NB(2). Make sure to initialize ret variable to { 0 } before calling, + * else Bad things will happen in the XDR code. * * NB(3) You must have the client lock before calling this * --=20 2.41.0