projects
/
platform
/
upstream
/
rpm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
746070e
)
Use rpmFileHasSuffix() instead of doing the same manually
author
Panu Matilainen
<pmatilai@redhat.com>
Mon, 31 Aug 2009 09:46:59 +0000
(12:46 +0300)
committer
Panu Matilainen
<pmatilai@redhat.com>
Mon, 31 Aug 2009 09:46:59 +0000
(12:46 +0300)
lib/rpmgi.c
patch
|
blob
|
history
diff --git
a/lib/rpmgi.c
b/lib/rpmgi.c
index
011076a
..
e53391b
100644
(file)
--- 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;