summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVarsha Rao <rvarsha016@gmail.com>2017-08-16 19:48:15 +0530
committerPablo Neira Ayuso <pablo@netfilter.org>2017-08-17 12:48:20 +0200
commit594805845af5104a12075f5e0f5ec4d66a2a3e5b (patch)
tree3391fee89ffd2f4d86cae8397f9a4e872ad68b9b
parentdf39a5b9204964bdf90e328a894c606a12b16b2c (diff)
src: cli: Remove cli_display() function.
Remove cli_display() function, as it is not called anywhere in source code. Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--include/cli.h1
-rw-r--r--src/cli.c26
2 files changed, 0 insertions, 27 deletions
diff --git a/include/cli.h b/include/cli.h
index e5774008..40fc63ea 100644
--- a/include/cli.h
+++ b/include/cli.h
@@ -15,6 +15,5 @@ static inline int cli_init(struct nft_ctx *nft, struct mnl_socket *nf_sock,
}
#endif
extern void cli_exit(void);
-extern void cli_display(const char *fmt, va_list ap) __fmtstring(1, 0);
#endif
diff --git a/src/cli.c b/src/cli.c
index a50fc589..d0ca9afb 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -149,32 +149,6 @@ static char **cli_completion(const char *text, int start, int end)
return NULL;
}
-void __fmtstring(1, 0) cli_display(const char *fmt, va_list ap)
-{
- int point, end;
- char *buf;
-
- point = rl_point;
- end = rl_end;
- rl_point = rl_end = 0;
-
- rl_save_prompt();
- rl_clear_message();
-
- if (vasprintf(&buf, fmt, ap) < 0)
- fprintf(rl_outstream, "cli_display: out of memory\n");
- else {
- fprintf(rl_outstream, "%s\n", buf);
- xfree(buf);
- }
-
- rl_restore_prompt();
-
- rl_point = point;
- rl_end = end;
- rl_forced_update_display();
-}
-
int cli_init(struct nft_ctx *nft, struct mnl_socket *nf_sock,
struct nft_cache *cache, struct parser_state *_state)
{