Skip to contentSkip to conversation

src: make nflog_open_nfnl() static

PATCH In review Duncan Roe 2 participants 2 messages Sep 13, 2021 – Sep 20, 2021 netfilter

lore
Share & tools
lore

Duncan Roe

author
#0 lore raw

PATCH 1/1 src: make nflog_open_nfnl() static

nflog_open_nfnl() is neither documented nor used outside the source file wherin it is defined.
(ulogd doesn't use this function either).

---
 include/libnetfilter_log/libnetfilter_log.h | 1 -
 src/libnetfilter_log.c                      | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
include/libnetfilter_log/libnetfilter_log.h +0 -1
index c27149f..771d203 100644
@@ -32,7 +32,6 @@ typedef int nflog_callback(struct nflog_g_handle *gh, struct nfgenmsg *nfmsg,
 
 
 extern struct nflog_handle *nflog_open(void);
-extern struct nflog_handle *nflog_open_nfnl(struct nfnl_handle *nfnlh);
 extern int nflog_close(struct nflog_handle *h);
 
 extern int nflog_bind_pf(struct nflog_handle *h, uint16_t pf);
src/libnetfilter_log.c +1 -1
index 546d667..7eada15 100644
@@ -233,7 +233,7 @@ int nflog_fd(struct nflog_handle *h)
  * @}
  */
 
-struct nflog_handle *nflog_open_nfnl(struct nfnl_handle *nfnlh)
+static struct nflog_handle *nflog_open_nfnl(struct nfnl_handle *nfnlh)
 {
 	struct nflog_handle *h;
 	int err;
Signature · 1 line
2.17.5
#1 lore raw
Quoted 3 lines · Duncan Roe

nflog_open_nfnl() is neither documented nor used outside the source file wherin it is defined.
(ulogd doesn't use this function either).

I'm afraid someone might be using it, even if it was never documented.