diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-06-10 13:40:51 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-06-10 13:40:51 +0300 |
commit | 00a9e06618a09d057fdf08d2608536da75e741db (patch) | |
tree | 4c5319be100bd463a0914d3514ec08ad1afb633c /lib/psm.c | |
parent | 54f40c0faf2fc203447dc1533a2e3a3456551567 (diff) | |
download | rpm-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.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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; } } |