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/headerfmt.c | |
parent | 4ef65c9a4218f9b354b00708ee2126fb1b7bec74 (diff) | |
download | rpm-746070ebe15022b482d6b3a5d54499ba09c5aa00.tar.gz |
Replace equal/not equal uses of str[n]cmp() with rstreq[n] in header code
Diffstat (limited to 'lib/headerfmt.c')
-rw-r--r-- | lib/headerfmt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/headerfmt.c b/lib/headerfmt.c index 8ec5a4fa0..f0f78bd7f 100644 --- a/lib/headerfmt.c +++ b/lib/headerfmt.c @@ -235,12 +235,12 @@ static int findTag(headerSprintfArgs hsa, sprintfToken token, const char * name) stag->fmt = NULL; stag->tag = -1; - if (!strcmp(tagname, "*")) { + if (rstreq(tagname, "*")) { stag->tag = -2; goto bingo; } - if (strncmp("RPMTAG_", tagname, sizeof("RPMTAG_")-1) == 0) { + if (rstreqn("RPMTAG_", tagname, sizeof("RPMTAG_")-1)) { tagname += sizeof("RPMTAG"); } @@ -760,7 +760,7 @@ static char * singleSprintf(headerSprintfArgs hsa, sprintfToken token, spft = token->u.array.format; isxml = (spft->type == PTOK_TAG && spft->u.tag.type != NULL && - !strcmp(spft->u.tag.type, "xml")); + rstreq(spft->u.tag.type, "xml")); if (isxml) { const char * tagN = rpmTagGetName(spft->u.tag.tag); @@ -853,7 +853,7 @@ char * headerFormat(Header h, const char * fmt, errmsg_t * errmsg) (hsa.format->type == PTOK_ARRAY ? &hsa.format->u.array.format->u.tag : NULL)); - isxml = (tag != NULL && tag->tag == -2 && tag->type != NULL && !strcmp(tag->type, "xml")); + isxml = (tag != NULL && tag->tag == -2 && tag->type != NULL && rstreq(tag->type, "xml")); if (isxml) { need = sizeof("<rpmHeader>\n") - 1; |