[PATCH libnetfilter_queue v3 3/5] src: Use more meaningful name in callback.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Replace 'struct qwerty' with 'struct data_carrier'.
Also get rid of the typedef.

Signed-off-by: Duncan Roe <duncan_roe@xxxxxxxxxxxxxxx>
---
v3: New patch
 src/extra/callback.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/extra/callback.c b/src/extra/callback.c
index 057d55a..dee6fc2 100644
--- a/src/extra/callback.c
+++ b/src/extra/callback.c
@@ -21,32 +21,32 @@
 /* needed by local_cb(); absent that, pass them down through the data arg */
 /* ---------------------------------------------------------------------- */
 
-typedef struct qwerty
+struct data_carrier
 {
 	nfq_cb_t cb_func;
 	size_t buflen;
 	size_t bufcap;
 	void *data;
-} werty;
+};
 
 static int local_cb(const struct nlmsghdr *nlh, void *data)
 {
 	struct pkt_buff pktb_instance = { };
-	werty *w = (werty *)data;
+	struct data_carrier *d = (struct data_carrier *)data;
 
-	return w->cb_func(nlh, w->data, &pktb_instance, w->bufcap - w->buflen);
+	return d->cb_func(nlh, d->data, &pktb_instance, d->bufcap - d->buflen);
 }
 
 EXPORT_SYMBOL int nfq_cb_run(const void *buf, size_t buflen, size_t bufcap,
 			     unsigned int portid, nfq_cb_t cb_func, void *data)
 {
 	const struct nlmsghdr *nlh = buf;
-	werty wert;
+	struct data_carrier dc;
 
-	wert.cb_func = cb_func;
-	wert.bufcap = bufcap;
-	wert.buflen = buflen;
-	wert.data = data;
+	dc.cb_func = cb_func;
+	dc.bufcap = bufcap;
+	dc.buflen = buflen;
+	dc.data = data;
 
 	/* Verify not multi-part */
 	if (nlh->nlmsg_flags & NLM_F_MULTI) {
@@ -55,5 +55,5 @@ EXPORT_SYMBOL int nfq_cb_run(const void *buf, size_t buflen, size_t bufcap,
 	}
 
 
-	return mnl_cb_run(buf, buflen, 0, portid, local_cb, &wert);
+	return mnl_cb_run(buf, buflen, 0, portid, local_cb, &dc);
 }
-- 
2.17.5




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux