Skip to contentSkip to conversation

xt_helper: use ARRAY_SIZE()

PATCH New Changli Gao 1 participant 1 message Jul 23, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 xt_helper: use ARRAY_SIZE()

use ARRAY_SIZE() to improve the readability.

----

 net/netfilter/xt_helper.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/xt_helper.c +1 -1
index 9f4ab00..805c9f6 100644
@@ -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;
 }