diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2009-08-31 12:46:59 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2009-08-31 12:46:59 +0300 |
commit | 9ff1cf55f4214f582808a2ad91d68332e0c7a87c (patch) | |
tree | a1e079ab948f200125799f68a93d57ce99869c6e /lib/rpmgi.c | |
parent | 746070ebe15022b482d6b3a5d54499ba09c5aa00 (diff) | |
download | librpm-tizen-9ff1cf55f4214f582808a2ad91d68332e0c7a87c.tar.gz librpm-tizen-9ff1cf55f4214f582808a2ad91d68332e0c7a87c.tar.bz2 librpm-tizen-9ff1cf55f4214f582808a2ad91d68332e0c7a87c.zip |
Use rpmFileHasSuffix() instead of doing the same manually
Diffstat (limited to 'lib/rpmgi.c')
-rw-r--r-- | lib/rpmgi.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/rpmgi.c b/lib/rpmgi.c index 011076a6d..e53391bbc 100644 --- a/lib/rpmgi.c +++ b/lib/rpmgi.c @@ -212,7 +212,6 @@ static rpmRC rpmgiWalkPathFilter(rpmgi gi) { FTSENT * fts = gi->fts; rpmRC rpmrc = RPMRC_NOTFOUND; - const char * s; static const int indent = 2; @@ -225,8 +224,7 @@ rpmlog(RPMLOG_DEBUG, "FTS_%s\t%*s %s%s\n", ftsInfoStr(fts->fts_info), switch (fts->fts_info) { case FTS_F: /* Ignore all but *.rpm files. */ - s = fts->fts_name + fts->fts_namelen + 1 - sizeof(".rpm"); - if (strcmp(s, ".rpm")) + if (!rpmFileHasSuffix(fts->fts_name, ".rpm")) break; rpmrc = RPMRC_OK; break; |