Skip to contentSkip to conversation

net/netfilter: make symbol static

PATCH New Hannes Eder 1 participant 2 messages May 28, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 net/netfilter: make symbol static

Fix this sparse warning:
net/netfilter/nf_log.c:219:17: warning: symbol 'nf_log_sysctl_path' was not declared. Should it be static?

---
 net/netfilter/nf_log.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/netfilter/nf_log.c +1 -1
index beb3731..7511aed 100644
@@ -216,7 +216,7 @@ static const struct file_operations nflog_file_ops = {
 #endif /* PROC_FS */
 
 #ifdef CONFIG_SYSCTL
-struct ctl_path nf_log_sysctl_path[] = {
+static struct ctl_path nf_log_sysctl_path[] = {
 	{ .procname = "net", .ctl_name = CTL_NET, },
 	{ .procname = "netfilter", .ctl_name = NET_NETFILTER, },
 	{ .procname = "nf_log", .ctl_name = CTL_UNNUMBERED, },
#1 lore raw

PATCH 2/2 net/netfilter: remove redundant variable

---
 net/netfilter/nf_log.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
net/netfilter/nf_log.c +0 -1
index 7511aed..b584cc2 100644
@@ -47,7 +47,6 @@ int nf_log_register(u_int8_t pf, struct nf_logger *logger)
 	mutex_lock(&nf_log_mutex);
 
 	if (pf == NFPROTO_UNSPEC) {
-		int i;
 		for (i = NFPROTO_UNSPEC; i < NFPROTO_NUMPROTO; i++)
 			list_add_tail(&(logger->list[i]), &(nf_loggers_l[i]));
 	} else {