I will partially revert commit 44d0532
Dmitry V. Levin
ldv at altlinux.org
Tue Jan 24 10:53:36 UTC 2012
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20120124/6eeb151b/attachment.bin>
More information about the Strace-devel
mailing list