summaryrefslogtreecommitdiffstats
path: root/src/libnftables.c
diff options
context:
space:
mode:
authorArturo Borrero Gonzalez <arturo@netfilter.org>2019-07-01 12:53:10 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2019-07-01 20:43:46 +0200
commitf218391fb8d3c9fde3a4897a1188f0aec811dcbe (patch)
tree5dfc6d3736ffb3cfe26725a0d073a730ad70b1fd /src/libnftables.c
parent7c0407c5ca538f5e9e3dbff712971141db4a9afb (diff)
libnftables: reallocate definition of nft_print() and nft_gmp_print()
They are not part of the libnftables library API, they are not public symbols, so it doesn't not make sense to have them there. Move the two functions to a different source file so libnftables.c only has the API functions. I think copyright belongs to Phil Sutter since he introduced this code back in commit 2535ba7006f22a6470f4c88ea7d30c343a1d8799 (src: get rid of printf). Signed-off-by: Arturo Borrero Gonzalez <arturo@netfilter.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/libnftables.c')
-rw-r--r--src/libnftables.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/libnftables.c b/src/libnftables.c
index dccb8ab4..f2cd267d 100644
--- a/src/libnftables.c
+++ b/src/libnftables.c
@@ -507,30 +507,3 @@ err:
cache_release(&nft->cache);
return rc;
}
-
-int nft_print(struct output_ctx *octx, const char *fmt, ...)
-{
- int ret;
- va_list arg;
-
- va_start(arg, fmt);
- ret = vfprintf(octx->output_fp, fmt, arg);
- va_end(arg);
- fflush(octx->output_fp);
-
- return ret;
-}
-
-int nft_gmp_print(struct output_ctx *octx, const char *fmt, ...)
-{
- int ret;
- va_list arg;
-
- va_start(arg, fmt);
- ret = gmp_vfprintf(octx->output_fp, fmt, arg);
- va_end(arg);
- fflush(octx->output_fp);
-
- return ret;
-}
-