summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Hackmann <ghackmann@google.com>2013-11-27 17:09:20 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2013-11-27 17:09:20 +0000
commitdde75d940a0f8c177fea9299c26959eeb6707033 (patch)
treed31ce8846242fc2f5d577dfa3b00d58b8f56db5a
parent7b1791e153bb836f72ee122691f80f2012c9fe75 (diff)
parent675c996651e0513e9c7b657d356c55f9b05c7c9f (diff)
downloadsystem_core-dde75d940a0f8c177fea9299c26959eeb6707033.zip
system_core-dde75d940a0f8c177fea9299c26959eeb6707033.tar.gz
system_core-dde75d940a0f8c177fea9299c26959eeb6707033.tar.bz2
am 675c9966: am 0914e01e: Merge "init: limit visibility of init_parser.c helpers"
* commit '675c996651e0513e9c7b657d356c55f9b05c7c9f': init: limit visibility of init_parser.c helpers
-rw-r--r--init/init_parser.c10
-rw-r--r--init/parser.h1
2 files changed, 5 insertions, 6 deletions
diff --git a/init/init_parser.c b/init/init_parser.c
index 3f0838f..f49e698 100644
--- a/init/init_parser.c
+++ b/init/init_parser.c
@@ -60,7 +60,7 @@ static void parse_line_action(struct parse_state *state, int nargs, char **args)
#define KEYWORD(symbol, flags, nargs, func) \
[ K_##symbol ] = { #symbol, func, nargs + 1, flags, },
-struct {
+static struct {
const char *name;
int (*func)(int nargs, char **args);
unsigned char nargs;
@@ -76,7 +76,7 @@ struct {
#define kw_func(kw) (keyword_info[kw].func)
#define kw_nargs(kw) (keyword_info[kw].nargs)
-int lookup_keyword(const char *s)
+static int lookup_keyword(const char *s)
{
switch (*s++) {
case 'c':
@@ -170,7 +170,7 @@ int lookup_keyword(const char *s)
return K_UNKNOWN;
}
-void parse_line_no_op(struct parse_state *state, int nargs, char **args)
+static void parse_line_no_op(struct parse_state *state, int nargs, char **args)
{
}
@@ -293,7 +293,7 @@ err:
return -1;
}
-void parse_import(struct parse_state *state, int nargs, char **args)
+static void parse_import(struct parse_state *state, int nargs, char **args)
{
struct listnode *import_list = state->priv;
struct import *import;
@@ -318,7 +318,7 @@ void parse_import(struct parse_state *state, int nargs, char **args)
INFO("found import '%s', adding to import list", import->filename);
}
-void parse_new_section(struct parse_state *state, int kw,
+static void parse_new_section(struct parse_state *state, int kw,
int nargs, char **args)
{
printf("[ %s %s ]\n", args[0],
diff --git a/init/parser.h b/init/parser.h
index 0a5802a..a58272a 100644
--- a/init/parser.h
+++ b/init/parser.h
@@ -33,7 +33,6 @@ struct parse_state
void *priv;
};
-int lookup_keyword(const char *s);
void DUMP(void);
int next_token(struct parse_state *state);
void parse_error(struct parse_state *state, const char *fmt, ...);