2011/1/27 Jeff Johnson <firstname.lastname@example.org>:
> What is was the warning? If it was return value from headerFree()
> being ignored, then try something simpler like
Yupp, but I thought that I could cut down to just one assignment..
> (void) headerFree(s->h);
> s->h = NULL;
> (headerFree is perfectly prepared to deal with NULL args, and there
> are almost no cases in any rpm code where the rpmfooFree() return
> is actually needed/used. See rpmio/url.c cache tear down for an example
> of where the non-NULL is actually meaningfully used to eliminate ALL
> references to force an actual free. There's another usage in Fclose(),
> but be forewarned:
> There are monsters in Fclose().
> Note that your change can/will lead to s->h possibly
> being non-null. headerFree() will return NULL iff
> the refcount is 0.
Ah, i thought that headerFree() would always return NULL,
which is why I thought doing only one assignment would be
I guess I should revert this one then..
Received on Thu Jan 27 20:55:08 2011