From: Eric Leblond <eric@inl.fr>
To: Netfilter Developer Mailing List <netfilter-devel@vger.kernel.org>
Subject: Ulogd2: code cleaning
Date: Fri, 04 Jan 2008 00:45:21 +0100 [thread overview]
Message-ID: <1199403921.16528.24.camel@localhost> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 416 bytes --]
Hi,
This patch adds an enum to get rid of access to array via numerical
index in NFLOG input plugin.
This replaces code like:
ret[0].flags |= ULOGD_RETF_VALID;
ret[11].u.value.ui16 = ntohs(hw->hw_addrlen);
with:
ret[NFLOG_KEY_RAW_MAC].flags |= ULOGD_RETF_VALID;
ret[NFLOG_KEY_RAW_MAC_LEN].u.value.ui16 = ntohs(hw->hw_addrlen);
which is more readable.
BR,
--
Eric Leblond <eric@inl.fr>
INL
[-- Attachment #1.2: ulogd2-add-enum-to-clarify-code.diff --]
[-- Type: text/x-patch, Size: 243 bytes --]
Property changes on:
___________________________________________________________________
Name: svk:merge
+0b57ae21-50e8-736f-5406-6d6bf2ce425a:/branches/ulog/ulogd2:7165
ef537a13-0406-4ad5-aefd-0de7f227950f:/local/ulogd2-inl:4908
[-- Attachment #2: Ceci est une partie de message numériquement signée --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next reply other threads:[~2008-01-03 23:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-03 23:45 Eric Leblond [this message]
2008-01-03 23:56 ` Resend: Ulogd2: code cleaning Eric Leblond
2008-01-04 14:11 ` Patrick McHardy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1199403921.16528.24.camel@localhost \
--to=eric@inl.fr \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).