On 05/16/2012 05:50 AM, Andreas Färber wrote: > Am 15.05.2012 18:08, schrieb Fabien Chouteau: >> On 05/15/2012 03:31 PM, Andreas Färber wrote: >>> Am 15.05.2012 11:39, schrieb Fabien Chouteau: >>>> Do not call cpu_dump_state if logfile is NULL. >>> >>> And where is log_cpu_state() being called from? Its caller is passing >>> NULL already then. >>> >> >> No, logfile is a global variable. log_cpu_state() takes only CPUState >> and flags parameters. > > Ah, I see now that f is a different f here, logfile becomes > log_cpu_state()'s f. Unfortunate naming. > > Your fix looks OK then but I would recommend turning it into a static > inline function to avoid the line breaks. >
In this case I can rewrite all the macros in qemu-log.h to static inline. -- Fabien Chouteau