From nobody Mon Feb 9 04:14:19 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=1642415055; cv=none; d=zohomail.com; s=zohoarc; b=B0eB8YVkJUFc/HVXPQC1hrSe7wbnCNkAAMxUPkV3KfK4vyEoWjS2bmYQWU8IkmDfp9hhZdypCiqVQ40lL4UIjbJrTRXKqHtlxXeGE3d2E1l3eLEMMyiXO/s2mM1LTsQIt4cOw026CUrihAy+FlIJqdH0wuuT3xoeavMCO+5YgAY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642415055; 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; bh=BmJDS0mn3IlmisZ/ZDwA2RGGW9iZB+SWZmBHPFy0vgY=; b=N3Pxe7LXnVVq3XEL8i9t7GtRc4XLuYRRh0H+oMlejszpcgO5CjCYVro4O69AU9JYZ/dIbNSW1DOLo+exoD3l6uHIrWHVHUPBz5cVYg8K2Oz3vDL1rK2jp/qEqXW9qFPLXjXALt9WFzLlyl2yZfWM77f8HtSmwn6olhc6zpiV0qI= 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 1642415055014103.33562855095931; Mon, 17 Jan 2022 02:24:15 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-385-U_oWf5xpPKi3uLV_PVSPkg-1; Mon, 17 Jan 2022 05:24:12 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9F46F100C66A; Mon, 17 Jan 2022 10:24:07 +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 2703122DEC; Mon, 17 Jan 2022 10:24:07 +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 B693B1809CB8; Mon, 17 Jan 2022 10:24:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20HAKUTD006254 for ; Mon, 17 Jan 2022 05:20:30 -0500 Received: by smtp.corp.redhat.com (Postfix) id B0119752B4; Mon, 17 Jan 2022 10:20:30 +0000 (UTC) Received: from work.redhat.com (unknown [10.39.193.91]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0586F752C3; Mon, 17 Jan 2022 10:19:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642415054; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=BmJDS0mn3IlmisZ/ZDwA2RGGW9iZB+SWZmBHPFy0vgY=; b=PGxerBzBz0nU0dcJwRbWOEO/8hhQ0sPDrFMwakamSs/Ups/TznO05velrYVS5/6zAr/Zc2 N0vo02wFmuSdQUCqr7CCL9iqaxScnrBK9g8tSoAC2h5TWUXuuj/kssYVjfQVQ8/ukRsSed RSNWl7RM3BOd4OwAg5DjXS6+0u0FiCk= X-MC-Unique: U_oWf5xpPKi3uLV_PVSPkg-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v2 2/2] docs: coding-style: One variable declaration per line Date: Mon, 17 Jan 2022 11:19:03 +0100 Message-Id: <20220117101903.99900-3-twiederh@redhat.com> In-Reply-To: <20220117101903.99900-1-twiederh@redhat.com> References: <20220117101903.99900-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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: 1642415056731100001 Content-Type: text/plain; charset="utf-8" This was not mentioned before. Signed-off-by: Tim Wiederhake --- docs/coding-style.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/coding-style.rst b/docs/coding-style.rst index ee4d551805..01f1e25127 100644 --- a/docs/coding-style.rst +++ b/docs/coding-style.rst @@ -600,6 +600,19 @@ calling another function. ... } =20 +Prefer variable definitions on separate lines. This allows for smaller, +easier to understand diffs when changing them. Define variables in the +smallest possible scope. + +:: + + GOOD: + int count =3D 0; + int nnodes; + + BAD: + int count =3D 0, nnodes; + Attribute annotations --------------------- =20 --=20 2.31.1