From nobody Sat Feb 7 05:49:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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=1591868686; cv=none; d=zohomail.com; s=zohoarc; b=nL5VqJ7FHOSiDAA4n8WU4HXe8dJ9ioRl3WYYY+zYmKIxbDER9RCAr2Z8SPCcUps7hktzt60DnNbPMFVsoThdDoiFrftyD9NAFv6cSFU5hjGCQaa1/7GF2joXnDcPEjx8P6L/2r5Wnd+6xnHMtqKowa7Qr0a1W5HjfWliSnlkU4g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591868686; 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=Yxuu9wVvXbge4d61dSNdJ/UfLvc0BznijUQVxNguoew=; b=d9tRPKNTHUasiwHhR1t4TWvqcf7lUWT6oWeB0c/1S6v3c+1b9TnfvIb1FbYUhtywoaFbK0GGT81Sd2aossv49uFP/FJHSqInC0lMzxjdQPyYaOe8qfnoPaGOQgMbEPXgL/Chd+gBMD1oR9yuB+z6mSqHFUpx7JwT50HqwOWO3uc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1591868686956756.2658830904053; Thu, 11 Jun 2020 02:44:46 -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-460-Zy9k0FXXPDaiKu_kxVQWag-1; Thu, 11 Jun 2020 05:44:43 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2FD951883608; Thu, 11 Jun 2020 09:44:38 +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 117FF5C296; Thu, 11 Jun 2020 09:44:38 +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 D77761809554; Thu, 11 Jun 2020 09:44:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 05B9hldv030250 for ; Thu, 11 Jun 2020 05:43:47 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2D77078914; Thu, 11 Jun 2020 09:43:47 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.40.208.90]) by smtp.corp.redhat.com (Postfix) with ESMTP id 973687C3C5 for ; Thu, 11 Jun 2020 09:43:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591868685; 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=Yxuu9wVvXbge4d61dSNdJ/UfLvc0BznijUQVxNguoew=; b=VCxQWgi3jDkUg6u9nyYLlbyp8uuVbJl/puAMvrb82B5YK1HHXU5tckjzpRtGIUyEnkKY5G /a5ftFC9NgzNpjCjImE34uMKn5hjuwqUkEcc36jOnCfrEe+xVUeEz2mBKroeU3AEmcTpc/ CFgx/frqgUnS6Jpy2O+hw/aWpkyvyiY= X-MC-Unique: Zy9k0FXXPDaiKu_kxVQWag-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 3/7] cputest: Avoid use of temporary variable in DO_TEST macro Date: Thu, 11 Jun 2020 11:43:35 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.16 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" Use g_free directly to free the returned pointer from virTestLogContentAndReset rather than store it in a temp variable. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/cputest.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/cputest.c b/tests/cputest.c index b66ea7850e..0cf6870574 100644 --- a/tests/cputest.c +++ b/tests/cputest.c @@ -997,10 +997,8 @@ mymain(void) flags, result \ }; \ char *testLabel; \ - char *tmp; \ \ - tmp =3D virTestLogContentAndReset(); \ - VIR_FREE(tmp); \ + g_free(virTestLogContentAndReset());\ \ testLabel =3D g_strdup_printf("%s(%s): %s", #api, \ virArchToString(arch), name); \ --=20 2.26.2