Skip to contentSkip to conversation

xt_helper: use sizeof()

PATCH Applied Changli Gao 2 participants 3 messages Jul 23, 2010

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

PATCH 1/1 xt_helper: use sizeof()

use sizeof() 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[sizeof(info->name) - 1] = '\0';
 	return 0;
 }
 
#1 lore raw
Quoted 2 lines · Changli Gao

use sizeof() to improve the readability.

Applied, thanks.

One more request about your changelogs though: please use capital letters at the beginning of new sentences in the patch description.

#2 lore raw
Quoted 5 lines · Patrick McHardy
Quoted 2 lines · Changli Gao

use sizeof() to improve the readability.

Applied, thanks.

I see that you sent another patch for this using a different subject. Please state it clearly when you wish to withdraw a patch. I've backed it out again.