|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCH 3/6] [trivial] trace: Cosmetic changes on fast-path tracing |
Date: | Mon, 13 Jun 2016 11:04:35 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 |
On 25/02/2016 16:03, Lluís Vilanova wrote: > static inline bool trace_event_get_state_dynamic(TraceEvent *ev) > { > - int id = trace_event_get_id(ev); > + TraceEventID id; > + assert(ev != NULL); Please don't add "!= NULL" asserts. The reason of a crash would be pretty obvious from the backtrace. In fact a NULL event is especially unlikely given that all events are held in an array... Paolo > + assert(trace_event_get_state_static(ev)); > + id = trace_event_get_id(ev); > return trace_event_get_state_dynamic_by_id(id); > } >
[Prev in Thread] | Current Thread | [Next in Thread] |