From: jbj Date: Sun, 20 May 2001 18:33:23 +0000 (+0000) Subject: - fix: i18n strings need 1 on sucess return code (#41313). X-Git-Tag: tznext/4.11.0.1.tizen20130304~7777 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8cc9d509e4e0009e16c7228bdf5d65a069054142;p=tools%2Flibrpm-tizen.git - fix: i18n strings need 1 on sucess return code (#41313). CVS patchset: 4799 CVS date: 2001/05/20 18:33:23 --- diff --git a/CHANGES b/CHANGES index 4c0699a..577d842 100644 --- a/CHANGES +++ b/CHANGES @@ -59,6 +59,7 @@ - upgrade to db-3.3.4. - fix: filter duplicate package removals (#35828). - add armv3l arch. + - fix: i18n strings need 1 on sucess return code (#41313). 4.0 -> 4.0.[12] - add doxygen and lclint annotations most everywhere. diff --git a/lib/header.c b/lib/header.c index 192bd34..348c9c1 100644 --- a/lib/header.c +++ b/lib/header.c @@ -1394,7 +1394,7 @@ static int intGetEntry(Header h, int_32 tag, /*@null@*/ /*@out@*/ int_32 * type, /*@modifies *type, *p, *c @*/ { struct indexEntry * entry; - int rc = 0; + int rc; /* First find the tag */ entry = findEntry(h, tag, RPM_NULL_TYPE); @@ -1407,6 +1407,7 @@ static int intGetEntry(Header h, int_32 tag, /*@null@*/ /*@out@*/ int_32 * type, switch (entry->info.type) { case RPM_I18NSTRING_TYPE: + rc = 1; if (type) *type = RPM_STRING_TYPE; if (c) *c = 1; /*@-dependenttrans@*/ @@ -1958,7 +1959,7 @@ static void findTag(char * name, const struct headerTagTableEntry * tags, /* Search extensions first to permit overriding header tags. */ ext = extensions; while (ext->type != HEADER_EXT_LAST) { - if (ext->type == HEADER_EXT_TAG && !strcasecmp(ext->name, tagname)) + if (ext->type == HEADER_EXT_TAG && !xstrcasecmp(ext->name, tagname)) break; if (ext->type == HEADER_EXT_MORE) @@ -1974,7 +1975,7 @@ static void findTag(char * name, const struct headerTagTableEntry * tags, /* Search header tags. */ for (entry = tags; entry->name; entry++) - if (!strcasecmp(entry->name, tagname)) break; + if (!xstrcasecmp(entry->name, tagname)) break; if (entry->name) { *tagMatch = entry; diff --git a/lib/tagName.c b/lib/tagName.c index 02c9fa1..c846acf 100644 --- a/lib/tagName.c +++ b/lib/tagName.c @@ -64,7 +64,7 @@ int tagValue(const char * tagstr) return RPMDBI_AVAILABLE; for (t = rpmTagTable; t->name != NULL; t++) { - if (!strcasecmp(t->name + 7, tagstr)) + if (!xstrcasecmp(t->name + 7, tagstr)) return t->val; } return -1;