kconfig: add 'static' to some file-local data
[carl9170fw.git] / config / lexer.l
index c52cce8b3751bb4d034e0a68ac13aa46188647aa..8b0fd8f121139968a5562263ec89affcf044f18c 100644 (file)
@@ -15,7 +15,7 @@
 #include <unistd.h>
 
 #include "lkc.h"
-#include "zconf.tab.h"
+#include "parser.tab.h"
 
 #define YY_DECL                static int yylex1(void)
 
@@ -36,7 +36,7 @@ struct buffer {
        YY_BUFFER_STATE state;
 };
 
-struct buffer *current_buf;
+static struct buffer *current_buf;
 
 static int last_ts, first_ts;
 
@@ -105,7 +105,7 @@ n   [A-Za-z0-9_-]
 "endchoice"            return T_ENDCHOICE;
 "endif"                        return T_ENDIF;
 "endmenu"              return T_ENDMENU;
-"help"|"---help---"    return T_HELP;
+"help"                 return T_HELP;
 "hex"                  return T_HEX;
 "if"                   return T_IF;
 "imply"                        return T_IMPLY;
@@ -378,7 +378,8 @@ FILE *zconf_fopen(const char *name)
        if (!f && name != NULL && name[0] != '/') {
                env = getenv(SRCTREE);
                if (env) {
-                       sprintf(fullname, "%s/%s", env, name);
+                       snprintf(fullname, sizeof(fullname),
+                                "%s/%s", env, name);
                        f = fopen(fullname, "r");
                }
        }