netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Ulogd2: code cleaning
@ 2008-01-03 23:45 Eric Leblond
  2008-01-03 23:56 ` Resend: " Eric Leblond
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Leblond @ 2008-01-03 23:45 UTC (permalink / raw)
  To: Netfilter Developer Mailing List


[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-01-04 14:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-03 23:45 Ulogd2: code cleaning Eric Leblond
2008-01-03 23:56 ` Resend: " Eric Leblond
2008-01-04 14:11   ` Patrick McHardy

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).