From nobody Sun Feb 8 20:28:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1604407409; cv=none; d=zohomail.com; s=zohoarc; b=e6CNUtCDON7JH9atUX11sUcihUeopgnAjh3I8CmJ1sOCzgwB6ZDh4MbLv83+/xkPBTC1i5iz663i0tXodKywY4nJFteQbt8v+v4mQOfe8jF5tC9ixLImvC0TuNDdgHuCzuoRAKVyPP7ySI+c++3aQ87hDlRGt5tjX88qauDGrz4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1604407409; 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=zsBp1T13vT2E9Cbe5aPfMUExGPtIR9qpJlMODRJrWcI=; b=OG2WwNWeFDOYJUcEZDBgFi+xQvdOj0JL3xughkqKYqCAvgPfNBAaE6fgwBG7rRo7H/iKit9nVBso6EY0LRLEdXKr4GVwIuCts7FI1cWR/ERo4HHjrC1m4ZrQNrbpGjq0lGdHFSlAgDapC9tTpwrF7kA2tBl2zng4up/YkC+Vr1s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1604407409797401.84846484620493; Tue, 3 Nov 2020 04:43:29 -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-233-xP6VQlQxMp6-9L_omFEhnQ-1; Tue, 03 Nov 2020 07:42:30 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 34FDA186DD29; Tue, 3 Nov 2020 12:42:24 +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 099911002D47; Tue, 3 Nov 2020 12:42:24 +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 C84C61826D36; Tue, 3 Nov 2020 12:42:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0A3Cg6o9016310 for ; Tue, 3 Nov 2020 07:42:06 -0500 Received: by smtp.corp.redhat.com (Postfix) id 7831473667; Tue, 3 Nov 2020 12:42:06 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.192.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id E5CF673664 for ; Tue, 3 Nov 2020 12:42:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604407408; 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=zsBp1T13vT2E9Cbe5aPfMUExGPtIR9qpJlMODRJrWcI=; b=UKM7tag5F1j4C1jAPMf2agv+QxGqNeXNmau1f/Qsbl62FrvZsmFzUKdd8o6gWHzvNAFOfL ghgPMls5cYTEZI2Ism+GI8UllPUVEg/1KpCmsDQrII0WcZ4k/VjlyjVl8SeMXwldTsRBc5 V01qQQHvriHW6SUMmFnzxsmR1bxrVf0= X-MC-Unique: xP6VQlQxMp6-9L_omFEhnQ-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 23/25] vircgroup: move parentPath declaration Date: Tue, 3 Nov 2020 13:41:35 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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.84 on 10.5.11.22 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) Content-Type: text/plain; charset="utf-8" It's used only inside the if condition. Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index f4c1623567..6caeb2d7f4 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -893,7 +893,6 @@ virCgroupNewPartition(const char *path, int controllers, virCgroupPtr *group) { - g_autofree char *parentPath =3D NULL; g_autofree char *newPath =3D NULL; g_autoptr(virCgroup) parent =3D NULL; g_autoptr(virCgroup) newGroup =3D NULL; @@ -915,7 +914,7 @@ virCgroupNewPartition(const char *path, =20 if (STRNEQ(newPath, "/")) { char *tmp; - parentPath =3D g_strdup(newPath); + g_autofree char *parentPath =3D g_strdup(newPath); =20 tmp =3D strrchr(parentPath, '/'); tmp++; --=20 2.26.2