[augeas-devel] [PATCH 1 of 4] Split ref counting macros into separate header

James Antill james.antill at redhat.com
Fri May 9 04:30:34 UTC 2008


On Thu, 2008-05-08 at 18:33 -0700, David Lutterkort wrote:
> +            if (--(s)->ref == 0) {                                      \
> +                /*memset(s, 255, sizeof(*s));*/                         \
> +                free_##t(s);                                            \
> +                (s) = NULL;                                             \
> +            }                                                           \
> +        }                                                               \

 I realise you're just moving this, but don't you want to move the "(s)
= NULL" out of that block ... as I assume you don't normally want to
unref() something twice?

-- 
James Antill <james.antill at redhat.com>
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20080509/5105c578/attachment.sig>


More information about the augeas-devel mailing list