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 :|