From: Panu Matilainen Date: Mon, 17 Dec 2007 11:01:50 +0000 (+0200) Subject: badDeps is encapsulated within depends, doesn't need const X-Git-Tag: rpm-4.6.0-rc1~1240 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=05a16276ba5c4337f7bd1e1d64957c3ce364c106;p=platform%2Fupstream%2Frpm.git badDeps is encapsulated within depends, doesn't need const - remove ancient reference code --- diff --git a/lib/depends.c b/lib/depends.c index d4b9f4a..e2d2d88 100644 --- a/lib/depends.c +++ b/lib/depends.c @@ -711,22 +711,12 @@ static int checkDependentConflicts(rpmts ts, const char * dep) } struct badDeps_s { - const char * pname; + char * pname; const char * qname; }; -#ifdef REFERENCE -static struct badDeps_s { -const char * pname; -const char * qname; -} badDeps[] = { - { NULL, NULL } -}; -#else static int badDepsInitialized = 0; - static struct badDeps_s * badDeps = NULL; -#endif /** */ @@ -734,6 +724,7 @@ static void freeBadDeps(void) { if (badDeps) { struct badDeps_s * bdp; + /* bdp->qname is a pointer to pname so doesn't need freeing */ for (bdp = badDeps; bdp->pname != NULL && bdp->qname != NULL; bdp++) bdp->pname = _free(bdp->pname); badDeps = _free(badDeps);