RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 26-Jun-2013 21:43:15 Branch: rpm-5_4 Handle: 2013062619431500 Modified files: (Branch: rpm-5_4) rpm/rpmdb rpmevr.c Log: - avoid some const relocations. Summary: Revision Changes Path 1.37.2.12 +4 -2 rpm/rpmdb/rpmevr.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/rpmdb/rpmevr.c ============================================================================ $ cvs diff -u -r1.37.2.11 -r1.37.2.12 rpmevr.c --- rpm/rpmdb/rpmevr.c 26 Jun 2013 19:40:05 -0000 1.37.2.11 +++ rpm/rpmdb/rpmevr.c 26 Jun 2013 19:43:15 -0000 1.37.2.12 @@ -147,7 +147,7 @@ } /*@unchecked@*/ /*@observer@*/ /*@null@*/ -static const char * _evr_tuple_match = +static const char _evr_tuple_match[] = "^(?:([^:-]+):)?([^:-]+)(?:-([^:-]+))?(?::([^:-]+))?$"; /*@unchecked@*/ /*@only@*/ /*@observer@*/ /*@null@*/ const char * evr_tuple_match = NULL; @@ -251,6 +251,8 @@ return rpmvercmp(a, b); } +/*@unchecked@*/ /*@observer@*/ /*@null@*/ +static const char _evr_tuple_order[] = "EVR"; /*@unchecked@*/ /*@only@*/ /*@observer@*/ /*@null@*/ static const char * evr_tuple_order = NULL; @@ -267,7 +269,7 @@ evr_tuple_order = rpmExpand("%{?evr_tuple_order}", NULL); if (evr_tuple_order == NULL || evr_tuple_order[0] == '\0') { evr_tuple_order = _free(evr_tuple_order); /* XXX coverity #1035895 */ - evr_tuple_order = xstrdup("EVR"); + evr_tuple_order = xstrdup(_evr_tuple_order); } } /*@=globs =internalglobs =mods @*/ @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org