On 08/05/2013 01:06 AM, Peter Maydell wrote: > + const char *exc = NULL; > + > + if (idx >= 0 && idx < ARRAY_SIZE(excnames)) { > + exc = excnames[idx]; > + } > + if (!exc) { > + exc = "unknown"; > + }
Silly test for null here. const char *exc = "unknown"; if (...) { exc = excnames[idx]; } Otherwise the patch looks good. r~