Ulogd2: code cleaning

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

 



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@xxxxxx>
INL
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: signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux