summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mklint.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/mklint.c b/mklint.c
index aec636e..1c17eea 100644
--- a/mklint.c
+++ b/mklint.c
@@ -7,7 +7,7 @@ NUSAGE(EXIT_ERROR, "[-f makefile]");
int exit_status = 0;
-static const char *default_makefiles[] = {
+static const char *const default_makefiles[] = {
"makefile",
"Makefile"
};
@@ -41,9 +41,10 @@ open_default_makefile(const char **pathp)
"alternatives are ./makefile and ./Makefile");
find_existing_fallbacks:
- for (; i < ELEMSOF(default_makefiles); i++)
+ for (i++; i < ELEMSOF(default_makefiles); i++)
if (!access(default_makefiles[i], F_OK))
- warnf_warning(WC_EXTRA_MAKEFILE, "found additional standard makefile: %s", *pathp);
+ warnf_warning(WC_EXTRA_MAKEFILE, "found additional standard makefile: %s",
+ default_makefiles[i]);
return fd;
}