summaryrefslogtreecommitdiff
path: root/lib/psm.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-06-10 13:40:51 +0300
committerPanu Matilainen <pmatilai@redhat.com>2008-06-10 13:40:51 +0300
commit00a9e06618a09d057fdf08d2608536da75e741db (patch)
tree4c5319be100bd463a0914d3514ec08ad1afb633c /lib/psm.c
parent54f40c0faf2fc203447dc1533a2e3a3456551567 (diff)
downloadrpm-00a9e06618a09d057fdf08d2608536da75e741db.tar.gz
rpm-00a9e06618a09d057fdf08d2608536da75e741db.tar.bz2
rpm-00a9e06618a09d057fdf08d2608536da75e741db.zip
Use rpmFileHasSuffix() instead of doing it manually
Diffstat (limited to 'lib/psm.c')
-rw-r--r--lib/psm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/psm.c b/lib/psm.c
index 705127baa..682e16fac 100644
--- 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;
}
}