2011/1/27 Jeff Johnson <n3...@mac.com>: > 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 cleaner.. I guess I should revert this one then..
-- Regards, Per Øyvind ______________________________________________________________________ RPM Package Manager http://rpm5.org Developer Communication List rpm-devel@rpm5.org