From nobody Mon Feb 9 13:59:30 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1619759947; cv=none; d=zohomail.com; s=zohoarc; b=DAKt6qhqg76fM6gjVCbhR7qWY8vLt9wc36Uwh712bNYQ2AfVoXJOKawqG3C6gwBwDrLVKiGYW2ApCLRslHVVTtw7Q1yqDMh9q+wanqYfbemhdoVZkjlj9nw3Y+PfvQehn9EP+cFhIz/HgCnXOIUOc1XtFSgIpsdb0vprnS/7kaY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619759947; 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=7Xwa82W4s5HQzySmIE+LoKeBEGTwJZIiuUdpLLcQFkM=; b=hzfRwLJlNLXL3q6NoIyJ16fXwaQGnOIV25hLI1+4Kyxx5EP1LRHBeR/v9Tcrq2SqXf+Jeba5w0jxm/B5iJssbjHjiscaKWmZqTg4+3aQ2iitJT/yzWoIbfwHieNmyu4r2eXvQOm8kIxrANkr1iMeVUmigiu0g6Twq8FqqBgR36Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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 [170.10.133.124]) by mx.zohomail.com with SMTPS id 16197599473911005.4665643819916; Thu, 29 Apr 2021 22:19:07 -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-310-q_l60A8zNNmwWcRvq6KGvQ-1; Fri, 30 Apr 2021 01:19:03 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CA6641006C85; Fri, 30 Apr 2021 05:18:58 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A90D01962E; Fri, 30 Apr 2021 05:18:58 +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 2FC663807; Fri, 30 Apr 2021 05:18:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13U5ItIj018816 for ; Fri, 30 Apr 2021 01:18:55 -0400 Received: by smtp.corp.redhat.com (Postfix) id 386537013A; Fri, 30 Apr 2021 05:18:55 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.194.129]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9E5CF7012F for ; Fri, 30 Apr 2021 05:18:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619759946; 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=7Xwa82W4s5HQzySmIE+LoKeBEGTwJZIiuUdpLLcQFkM=; b=UpcQUQ5JeqknGevgKbrvoo5PEbeGki2AEFHWx+5L/kfgjTlzbew24GEljx6VXsLijAShXr mkKyXFvkJjXNFodQsHd6Tiq3uRWEWjO6IpUlh5dvjGIhcawbbVg/8WmijzQAsVv2sTxbBC Tc9wHa0hv4LehOVYf+9nVrkwrK1fZ0U= X-MC-Unique: q_l60A8zNNmwWcRvq6KGvQ-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 1/2] qemu_domainjob: Drop 'const' from strings in _qemuDomainJobObj Date: Fri, 30 Apr 2021 07:18:48 +0200 Message-Id: <10aa7616223d8c200d54aeab77a067640711227e.1619759870.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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.11 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" These strings are not constant really. They are allocated in qemuDomainObjBeginJobInternal() and freed in qemuDomainReset*Job(). Freeing a pointer to const looks weird. Signed-off-by: Michal Privoznik Reviewed-by: Pavel Hrdina --- src/qemu/qemu_domainjob.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_domainjob.h b/src/qemu/qemu_domainjob.h index 75cf1deb6a..46cbb8a067 100644 --- a/src/qemu/qemu_domainjob.h +++ b/src/qemu/qemu_domainjob.h @@ -179,20 +179,20 @@ struct _qemuDomainJobObj { /* The following members are for QEMU_JOB_* */ qemuDomainJob active; /* Currently running job */ unsigned long long owner; /* Thread id which set current job= */ - const char *ownerAPI; /* The API which owns the job */ + char *ownerAPI; /* The API which owns the job */ unsigned long long started; /* When the current job started */ =20 /* The following members are for QEMU_AGENT_JOB_* */ qemuDomainAgentJob agentActive; /* Currently running agent job */ unsigned long long agentOwner; /* Thread id which set current age= nt job */ - const char *agentOwnerAPI; /* The API which owns the agent jo= b */ + char *agentOwnerAPI; /* The API which owns the agent jo= b */ unsigned long long agentStarted; /* When the current agent job star= ted */ =20 /* The following members are for QEMU_ASYNC_JOB_* */ virCond asyncCond; /* Use to coordinate with async jo= bs */ qemuDomainAsyncJob asyncJob; /* Currently active async job */ unsigned long long asyncOwner; /* Thread which set current async = job */ - const char *asyncOwnerAPI; /* The API which owns the async jo= b */ + char *asyncOwnerAPI; /* The API which owns the async jo= b */ unsigned long long asyncStarted; /* When the current async job star= ted */ int phase; /* Job phase (mainly for migration= s) */ unsigned long long mask; /* Jobs allowed during async job */ --=20 2.26.3