]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
src: cli: Remove cli_display() function.
authorVarsha Rao <rvarsha016@gmail.com>
Wed, 16 Aug 2017 14:18:15 +0000 (19:48 +0530)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 17 Aug 2017 10:48:20 +0000 (12:48 +0200)
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>
include/cli.h
src/cli.c

index e57740086b702722cd1f10af8cb797443443a439..40fc63ead5b455abe0ee98b584cc094bc487eb80 100644 (file)
@@ -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
index a50fc589423210959d5639c7ff0596ce399a3a63..d0ca9afbbdb10addbf82ee60fa996f1b12a59178 100644 (file)
--- 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)
 {