qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH for-2.8 v1 11/60] trace: remove use of event ID


From: Daniel P. Berrange
Subject: Re: [Qemu-devel] [PATCH for-2.8 v1 11/60] trace: remove use of event ID enums from APIs
Date: Wed, 14 Sep 2016 13:32:36 +0100
User-agent: Mutt/1.7.0 (2016-08-17)

On Fri, Sep 02, 2016 at 05:13:48PM -0400, Stefan Hajnoczi wrote:
> On Tue, Aug 09, 2016 at 06:26:49PM +0200, Paolo Bonzini wrote:
> > 
> > 
> > On 09/08/2016 18:24, Daniel P. Berrange wrote:
> > >>> > > -static inline TraceEventID trace_event_get_id(TraceEvent *ev)
> > >>> > > +static inline size_t trace_event_get_id(TraceEvent *ev)
> > >>> > >  {
> > >>> > >      assert(ev != NULL);
> > >>> > >      return ev->id;
> > >> > 
> > >> > Perhaps "unsigned" is a better match than size_t?
> > > I don't mind either way - I just happen to personally always use size_t
> > > for anything that ends up being used primarily as an array index.
> > 
> > Makes sense.  I was thinking of simpletrace's 32-bit id instead.
> 
> I think unsigned is slightly clearer since it expresses the intent that
> the values are limited to 32 bits.

I'll switch to 'uint32_t' since that unambigously matches that
simpletrace mandates.


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|



reply via email to

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