From patchwork Thu Jun 23 16:27:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 70770 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp518660qgy; Thu, 23 Jun 2016 09:31:10 -0700 (PDT) X-Received: by 10.28.68.85 with SMTP id r82mr14009976wma.18.1466699469892; Thu, 23 Jun 2016 09:31:09 -0700 (PDT) Return-Path: Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com. [209.132.183.24]) by mx.google.com with ESMTPS id y3si1152655wjd.73.2016.06.23.09.31.09 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 23 Jun 2016 09:31:09 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.24 as permitted sender) client-ip=209.132.183.24; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.24 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u5NGSJKC007459; Thu, 23 Jun 2016 12:28:19 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u5NGRuxe020071 for ; Thu, 23 Jun 2016 12:27:56 -0400 Received: from colepc.redhat.com (ovpn-116-65.rdu2.redhat.com [10.10.116.65]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u5NGRs9N010505; Thu, 23 Jun 2016 12:27:56 -0400 From: Cole Robinson To: libvirt-list@redhat.com Date: Thu, 23 Jun 2016 12:27:46 -0400 Message-Id: <2db9123194865318496fea0ddbb61d382a60ee1f.1466699232.git.crobinso@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/6] events: Cleanup callback variable name 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: , MIME-Version: 1.0 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com In every other instance virObjectEventCallbackPtr is named 'cb', and in other code 'event' usually means a virObjectEventPtr --- src/conf/object_event.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) -- 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/src/conf/object_event.c b/src/conf/object_event.c index 1b5a4d0..2230eec 100644 --- a/src/conf/object_event.c +++ b/src/conf/object_event.c @@ -393,7 +393,7 @@ virObjectEventCallbackListAddID(virConnectPtr conn, int *callbackID, bool serverFilter) { - virObjectEventCallbackPtr event; + virObjectEventCallbackPtr cb; int ret = -1; int remoteID = -1; @@ -417,30 +417,30 @@ virObjectEventCallbackListAddID(virConnectPtr conn, _("event callback already tracked")); return -1; } - /* Allocate new event */ - if (VIR_ALLOC(event) < 0) + /* Allocate new cb */ + if (VIR_ALLOC(cb) < 0) goto cleanup; - event->conn = virObjectRef(conn); - *callbackID = event->callbackID = cbList->nextID++; - event->cb = callback; - event->klass = klass; - event->eventID = eventID; - event->opaque = opaque; - event->freecb = freecb; - event->remoteID = remoteID; + cb->conn = virObjectRef(conn); + *callbackID = cb->callbackID = cbList->nextID++; + cb->cb = callback; + cb->klass = klass; + cb->eventID = eventID; + cb->opaque = opaque; + cb->freecb = freecb; + cb->remoteID = remoteID; /* Only need 'uuid' for matching; 'id' can change as domain * switches between running and shutoff, and 'name' can change in * Xen migration. */ if (uuid) { - event->uuid_filter = true; - memcpy(event->uuid, uuid, VIR_UUID_BUFLEN); + cb->uuid_filter = true; + memcpy(cb->uuid, uuid, VIR_UUID_BUFLEN); } - event->filter = filter; - event->filter_opaque = filter_opaque; - event->legacy = legacy; + cb->filter = filter; + cb->filter_opaque = filter_opaque; + cb->legacy = legacy; - if (VIR_APPEND_ELEMENT(cbList->callbacks, cbList->count, event) < 0) + if (VIR_APPEND_ELEMENT(cbList->callbacks, cbList->count, cb) < 0) goto cleanup; /* When additional filtering is being done, every client callback @@ -455,7 +455,7 @@ virObjectEventCallbackListAddID(virConnectPtr conn, } cleanup: - virObjectEventCallbackFree(event); + virObjectEventCallbackFree(cb); return ret; }