From: Dmitry V. L. <ld...@al...> - 2012-01-24 10:53:48
|
On Tue, Jan 24, 2012 at 11:42:49AM +0100, Denys Vlasenko wrote: > On 01/24/2012 11:24 AM, Dmitry V. Levin wrote: > >On Tue, Jan 24, 2012 at 10:10:05AM +0100, Denys Vlasenko wrote: > >> msg = NULL; > >> vasprintf(&msg, fmt, p); > >> if (msg) { > > > >I'd rather replace these three lines with > > > > if (vasprintf(&msg, fmt, p)>= 0) { > > We can combine both just to be 200% paranoid-grade sure: > > if (vasprintf(&msg, fmt, p) >= 0 && msg) ... No need, the return code check is enough. -- ldv |