Skip to contentSkip to conversation

netfilter: nftables: Change the return type of nfulnl_set_timeout() and nfulnl_set_qthresh() to be void.

PATCH Applied Rami Rosen 2 participants 3 messages Dec 8, 2015 – Dec 9, 2015

Subsystems (2)
lore
Share & tools
lore

Rami Rosen

author
#0 lore raw

PATCH 1/1 netfilter: nftables: Change the return type of nfulnl_set_timeout() and nfulnl_set_qthresh() to be void.

This patch changes the return type of the static methods nfulnl_set_timeout() and nfulnl_set_qthresh() to be void, as there is no justification and no need for these methods to return int.

---
 net/netfilter/nfnetlink_log.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
net/netfilter/nfnetlink_log.c +2 -6
index dea4676..70b6bd3 100644
@@ -293,24 +293,20 @@ nfulnl_set_nlbufsiz(struct nfulnl_instance *inst, u_int32_t nlbufsiz)
 	return status;
 }
 
-static int
+static void
 nfulnl_set_timeout(struct nfulnl_instance *inst, u_int32_t timeout)
 {
 	spin_lock_bh(&inst->lock);
 	inst->flushtimeout = timeout;
 	spin_unlock_bh(&inst->lock);
-
-	return 0;
 }
 
-static int
+static void
 nfulnl_set_qthresh(struct nfulnl_instance *inst, u_int32_t qthresh)
 {
 	spin_lock_bh(&inst->lock);
 	inst->qthreshold = qthresh;
 	spin_unlock_bh(&inst->lock);
-
-	return 0;
 }
 
 static int
Signature · 1 line
2.5.0
maintainer Applied
#1 lore raw
Quoted 2 lines · Rami Rosen

This patch changes the return type of the static methods nfulnl_set_timeout() and nfulnl_set_qthresh() to be void, as there is no justification and no need for these methods to return int.

Applied, thanks.

#2 lore raw
Quoted 5 lines · Pablo Neira Ayuso
Quoted 2 lines · Rami Rosen

This patch changes the return type of the static methods nfulnl_set_timeout() and nfulnl_set_qthresh() to be void, as there is no justification and no need for these methods to return int.

Applied, thanks.

For the record, I have renamed the title to:

"netfilter: nfnetlink_log: Change setter functions to be void"

This is not related to nftables itself, but our userspace logging infrastructure.

Then I have trimmed off the title length a bit, I hope this retains the original spirit of it.