From 02939c15fa5441aff46c5f2cbf28086fe67d4d24 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Thu, 17 Apr 2008 17:33:30 +0300 Subject: More accurate filtering of .rpmnew etc when reading macros - strstr() can give false positives, use rpmFileHasSuffix() instead --- rpmio/macro.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rpmio/macro.c b/rpmio/macro.c index 06b2b5a79..8b41373d6 100644 --- a/rpmio/macro.c +++ b/rpmio/macro.c @@ -1575,9 +1575,9 @@ rpmInitMacros(rpmMacroContext mc, const char * macrofiles) /* Read macros from each file. */ for (i = 0; i < ac; i++) { - if (strstr(av[i], ".rpmnew") || - strstr(av[i], ".rpmsave") || - strstr(av[i], ".rpmorig")) { + if (rpmFileHasSuffix(av[i], ".rpmnew") || + rpmFileHasSuffix(av[i], ".rpmsave") || + rpmFileHasSuffix(av[i], ".rpmorig")) { continue; } (void) rpmLoadMacroFile(mc, av[i]); -- cgit v1.2.3