From: Varsha Rao <rvarsha016@gmail.com>
To: pablo@netfilter.org, netfilter-devel@vger.kernel.org
Cc: Varsha Rao <rvarsha016@gmail.com>
Subject: [PATCH nft 3/5] src: cli: Remove cli_display() function.
Date: Wed, 16 Aug 2017 19:48:15 +0530 [thread overview]
Message-ID: <20170816141817.20179-4-rvarsha016@gmail.com> (raw)
In-Reply-To: <20170816141817.20179-1-rvarsha016@gmail.com>
Remove cli_display() function, as it is not called anywhere in source
code.
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
---
include/cli.h | 1 -
src/cli.c | 26 --------------------------
2 files changed, 27 deletions(-)
diff --git a/include/cli.h b/include/cli.h
index e577400..40fc63e 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 a50fc58..d0ca9af 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)
{
--
2.13.5
next prev parent reply other threads:[~2017-08-16 14:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-16 14:18 [PATCH nft 0/5] src: Removes unused functions Varsha Rao
2017-08-16 14:18 ` [PATCH nft 1/5] src: Remove xt_stmt_() functions Varsha Rao
2017-08-16 14:18 ` [PATCH nft 2/5] src: gmputil: Remove mpz_get_be64() function Varsha Rao
2017-08-16 14:18 ` Varsha Rao [this message]
2017-08-16 14:18 ` [PATCH nft 4/5] src: netlink: Remove unused functions Varsha Rao
2017-08-16 14:18 ` [PATCH nft 5/5] src: mnl: " Varsha Rao
2017-08-19 12:11 ` [PATCH nft 0/5] src: Removes " Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170816141817.20179-4-rvarsha016@gmail.com \
--to=rvarsha016@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).