From 0ea82cb3a36c3be99cb876fd0fe50f7681f063be Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Tue, 16 May 2017 14:43:25 +0300 Subject: [PATCH] extra: make set_extra_mod_helper() void and static We only use this in smatch_extra.c and don't care about the return. Signed-off-by: Dan Carpenter --- smatch_extra.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/smatch_extra.c b/smatch_extra.c index d04b58a8..58850ead 100644 --- a/smatch_extra.c +++ b/smatch_extra.c @@ -79,13 +79,13 @@ void call_extra_mod_hooks(const char *name, struct symbol *sym, struct smatch_st } END_FOR_EACH_PTR(fn); } -struct sm_state *set_extra_mod_helper(const char *name, struct symbol *sym, struct smatch_state *state) +static void set_extra_mod_helper(const char *name, struct symbol *sym, struct smatch_state *state) { remove_from_equiv(name, sym); call_extra_mod_hooks(name, sym, state); if (__in_fake_assign && estate_is_unknown(state) && !get_state(SMATCH_EXTRA, name, sym)) - return NULL; - return set_state(SMATCH_EXTRA, name, sym, state); + return; + set_state(SMATCH_EXTRA, name, sym, state); } static char *get_pointed_at(const char *name, struct symbol *sym, struct symbol **new_sym) @@ -167,9 +167,8 @@ void set_extra_mod(const char *name, struct symbol *sym, struct smatch_state *st { char *new_name; struct symbol *new_sym; - struct sm_state *sm; - sm = set_extra_mod_helper(name, sym, state); + set_extra_mod_helper(name, sym, state); new_name = get_other_name_sym(name, sym, &new_sym); if (new_name && new_sym) set_extra_mod_helper(new_name, new_sym, state); -- 2.11.4.GIT