qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v2 35/40] job: Add JOB_STATUS_CHANGE QMP event


From: Eric Blake
Subject: Re: [Qemu-block] [PATCH v2 35/40] job: Add JOB_STATUS_CHANGE QMP event
Date: Fri, 18 May 2018 12:55:12 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 05/18/2018 08:21 AM, Kevin Wolf wrote:
This adds a QMP event that is emitted whenever a job transitions from
one status to another.

Signed-off-by: Kevin Wolf <address@hidden>
---
  qapi/job.json                 |  14 ++++
  job.c                         |  10 +++

@@ -157,6 +158,11 @@ static int job_txn_apply(JobTxn *txn, int fn(Job *), bool 
lock)
      return rc;
  }
+static bool job_is_internal(Job *job)
+{
+    return (job->id == NULL);

The () are not necessary. In fact, you could use !!job->id for less typing, or even rely on the compiler to auto-convert a pointer into bool by just 'return job->id' (although the latter feels a bit too terse to me).

Style is minor, so
Reviewed-by: Eric Blake <address@hidden>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]