* [PATCH v2] xt_helper: use ARRAY_SIZE()
@ 2010-07-23 9:24 Changli Gao
0 siblings, 0 replies; only message in thread
From: Changli Gao @ 2010-07-23 9:24 UTC (permalink / raw)
To: Patrick McHardy; +Cc: David S. Miller, netfilter-devel, netdev, Changli Gao
use ARRAY_SIZE() to improve the readability.
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
----
net/netfilter/xt_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/xt_helper.c b/net/netfilter/xt_helper.c
index 9f4ab00..805c9f6 100644
--- a/net/netfilter/xt_helper.c
+++ b/net/netfilter/xt_helper.c
@@ -65,7 +65,7 @@ static int helper_mt_check(const struct xt_mtchk_param *par)
par->family);
return ret;
}
- info->name[29] = '\0';
+ info->name[ARRAY_SIZE(info->name) - 1] = '\0';
return 0;
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-07-23 9:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-23 9:24 [PATCH v2] xt_helper: use ARRAY_SIZE() Changli Gao
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).