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:
54f40c0
)
Use rpmFileHasSuffix() instead of doing it manually
author
Panu Matilainen
<pmatilai@redhat.com>
Tue, 10 Jun 2008 10:40:51 +0000
(13:40 +0300)
committer
Panu Matilainen
<pmatilai@redhat.com>
Tue, 10 Jun 2008 10:40:51 +0000
(13:40 +0300)
lib/psm.c
patch
|
blob
|
history
diff --git
a/lib/psm.c
b/lib/psm.c
index
705127b
..
682e16f
100644
(file)
--- a/
lib/psm.c
+++ b/
lib/psm.c
@@
-330,9
+330,8
@@
rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd,
if (i == fi->fc) {
/* Find the spec file by name. */
for (i = 0; i < fi->fc; i++) {
- const char * t = fi->apath[i];
- t += strlen(fi->apath[i]) - 5;
- if (!strcmp(t, ".spec")) break;
+ if (rpmFileHasSuffix(fi->apath[i], ".spec"))
+ break;
}
}