On Thu, Sep 08, 2011 at 06:41:54PM +0200, Jean-Yves Migeon wrote: > On 08.09.2011 14:27, Joerg Sonnenberger wrote: > > There is no reason to allocate a string, just reserve e.g. 160 Bytes or > > so and use snprintf to that. But yes, the current usage is suboptimal. > > So let's make it a little bit more helpful: see panicstr.diff.
I would change one minor aspect: set panicstr to fmt before calling va_start etc, to give at least some basic information in case that fails for any reason. Otherwise I think that should go in, it already improves the status quo. We can discuss the rest after that. Joerg