diff mbox series

[libnetfilter_log,1/2] utils: nfulnl_test: Agree with man pages

Message ID 20210921085315.4340-2-duncan_roe@optusnet.com.au
State Accepted
Delegated to: Pablo Neira
Headers show
Series utils: nfulnl_test: Test nflog_get_packet_hw | expand

Commit Message

Duncan Roe Sept. 21, 2021, 8:53 a.m. UTC
Use the same variable name as the man pages / html for functions in the Parsing
module (e.g. nflog_get_msg_packet_hdr(nfad)).

Rationale: make it easier for users to follow the code
Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au>
---
 utils/nfulnl_test.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Comments

Pablo Neira Ayuso Sept. 28, 2021, 10:50 a.m. UTC | #1
On Tue, Sep 21, 2021 at 06:53:14PM +1000, Duncan Roe wrote:
> Use the same variable name as the man pages / html for functions in the Parsing
> module (e.g. nflog_get_msg_packet_hdr(nfad)).

Applied, thanks.
diff mbox series

Patch

diff --git a/utils/nfulnl_test.c b/utils/nfulnl_test.c
index 05ddc6c..237adc3 100644
--- a/utils/nfulnl_test.c
+++ b/utils/nfulnl_test.c
@@ -6,15 +6,15 @@ 
 
 #include <libnetfilter_log/libnetfilter_log.h>
 
-static int print_pkt(struct nflog_data *ldata)
+static int print_pkt(struct nflog_data *nfad)
 {
-	struct nfulnl_msg_packet_hdr *ph = nflog_get_msg_packet_hdr(ldata);
-	uint32_t mark = nflog_get_nfmark(ldata);
-	uint32_t indev = nflog_get_indev(ldata);
-	uint32_t outdev = nflog_get_outdev(ldata);
-	char *prefix = nflog_get_prefix(ldata);
+	struct nfulnl_msg_packet_hdr *ph = nflog_get_msg_packet_hdr(nfad);
+	uint32_t mark = nflog_get_nfmark(nfad);
+	uint32_t indev = nflog_get_indev(nfad);
+	uint32_t outdev = nflog_get_outdev(nfad);
+	char *prefix = nflog_get_prefix(nfad);
 	char *payload;
-	int payload_len = nflog_get_payload(ldata, &payload);
+	int payload_len = nflog_get_payload(nfad, &payload);
 
 	if (ph) {
 		printf("hw_protocol=0x%04x hook=%u ",