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. Stefan
signature.asc
Description: PGP signature