bc: placate compiler warnings
[oweals/busybox.git] / modutils / modprobe.c
index 59f6d54f371a8d1ef2bd0eae6fde299f6dc05a53..0a372a049062aae973654203c62b9c3fb3a55fda 100644 (file)
@@ -8,7 +8,7 @@
  * Licensed under GPLv2 or later, see file LICENSE in this source tree.
  */
 //config:config MODPROBE
-//config:      bool "modprobe (29 kb)"
+//config:      bool "modprobe (28 kb)"
 //config:      default y
 //config:      select PLATFORM_LINUX
 //config:      help
@@ -245,7 +245,7 @@ static int FAST_FUNC config_file_action(const char *filename,
        parser_t *p;
        struct module_entry *m;
        int rc = TRUE;
-       const char *base, *ext;
+       const char *base;
 
        /* Skip files that begin with a "." */
        base = bb_basename(filename);
@@ -266,8 +266,7 @@ static int FAST_FUNC config_file_action(const char *filename,
         * "include FILE_NOT_ENDING_IN_CONF" must work too.
         */
        if (depth != 0) {
-               ext = strrchr(base, '.');
-               if (ext == NULL || strcmp(ext + 1, "conf"))
+               if (!is_suffixed_with(base, ".conf"))
                        goto error;
        }