diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2009-08-31 12:43:02 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2009-08-31 12:43:02 +0300 |
commit | 746070ebe15022b482d6b3a5d54499ba09c5aa00 (patch) | |
tree | 763a2a677d105ecff3679c47d2216ed69d6a3052 /lib/header.c | |
parent | 4ef65c9a4218f9b354b00708ee2126fb1b7bec74 (diff) | |
download | librpm-tizen-746070ebe15022b482d6b3a5d54499ba09c5aa00.tar.gz librpm-tizen-746070ebe15022b482d6b3a5d54499ba09c5aa00.tar.bz2 librpm-tizen-746070ebe15022b482d6b3a5d54499ba09c5aa00.zip |
Replace equal/not equal uses of str[n]cmp() with rstreq[n] in header code
Diffstat (limited to 'lib/header.c')
-rw-r--r-- | lib/header.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/header.c b/lib/header.c index 53ab2b857..f9d553df3 100644 --- a/lib/header.c +++ b/lib/header.c @@ -1231,25 +1231,25 @@ static int headerMatchLocale(const char *td, const char *l, const char *le) const char *fe; /* First try a complete match. */ - if (strlen(td) == (le-l) && !strncmp(td, l, (le - l))) + if (strlen(td) == (le-l) && rstreqn(td, l, (le - l))) return 1; /* Next, try stripping optional dialect and matching. */ for (fe = l; fe < le && *fe != '@'; fe++) {}; - if (fe < le && !strncmp(td, l, (fe - l))) + if (fe < le && rstreqn(td, l, (fe - l))) return 1; /* Next, try stripping optional codeset and matching. */ for (fe = l; fe < le && *fe != '.'; fe++) {}; - if (fe < le && !strncmp(td, l, (fe - l))) + if (fe < le && rstreqn(td, l, (fe - l))) return 1; /* Finally, try stripping optional country code and matching. */ for (fe = l; fe < le && *fe != '_'; fe++) {}; - if (fe < le && !strncmp(td, l, (fe - l))) + if (fe < le && rstreqn(td, l, (fe - l))) return 2; return 0; @@ -1664,7 +1664,7 @@ int headerAddI18NString(Header h, rpmTag tag, const char * string, { const char * l = table->data; for (langNum = 0; langNum < table->info.count; langNum++) { - if (!strcmp(l, lang)) break; + if (rstreq(l, lang)) break; l += strlen(l) + 1; } } |