* [PATCH] iptables: Spelling fixes @ 2015-09-05 7:04 Ville Skyttä 2015-09-05 21:07 ` Pablo Neira Ayuso 0 siblings, 1 reply; 8+ messages in thread From: Ville Skyttä @ 2015-09-05 7:04 UTC (permalink / raw) To: netfilter-devel Signed-off-by: Ville Skyttä <ville.skytta@iki.fi> --- iptables/ip6tables.c | 6 +++--- iptables/iptables-xml.c | 2 +- iptables/iptables.c | 6 +++--- iptables/iptables.xslt | 2 +- libiptc/libiptc.c | 2 +- libxtables/xtables.c | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/iptables/ip6tables.c b/iptables/ip6tables.c index 8db13b4..4a597b7 100644 --- a/iptables/ip6tables.c +++ b/iptables/ip6tables.c @@ -1046,7 +1046,7 @@ static int print_match_save(const struct xt_entry_match *e, return 0; } -/* print a given ip including mask if neccessary */ +/* print a given ip including mask if necessary */ static void print_ip(const char *prefix, const struct in6_addr *ip, const struct in6_addr *mask, int invert) { @@ -1067,7 +1067,7 @@ static void print_ip(const char *prefix, const struct in6_addr *ip, printf("/%d", l); } -/* We want this to be readable, so only print out neccessary fields. +/* We want this to be readable, so only print out necessary fields. * Because that's the kind of world I want to live in. */ void print_rule6(const struct ip6t_entry *e, struct xtc_handle *h, const char *chain, int counters) @@ -1842,7 +1842,7 @@ int do_command6(int argc, char *argv[], char **table, if (!cs.target) { /* it is no chain, and we can't load a plugin. * We cannot know if the plugin is corrupt, non - * existant OR if the user just misspelled a + * existent OR if the user just misspelled a * chain. */ #ifdef IP6T_F_GOTO if (cs.fw6.ipv6.flags & IP6T_F_GOTO) diff --git a/iptables/iptables-xml.c b/iptables/iptables-xml.c index 7461412..f7ecdba 100644 --- a/iptables/iptables-xml.c +++ b/iptables/iptables-xml.c @@ -532,7 +532,7 @@ compareRules(void) in each rule, or rules didn't have an action NOTE: Depends on arguments being in some kind of "normal" order which is the case when processing the ACTUAL output of actual iptables-save - rather than a file merely in a compatable format */ + rather than a file merely in a compatible format */ unsigned int old = 0; unsigned int new = 0; diff --git a/iptables/iptables.c b/iptables/iptables.c index 88953c4..539dab5 100644 --- a/iptables/iptables.c +++ b/iptables/iptables.c @@ -1037,7 +1037,7 @@ static int print_match_save(const struct xt_entry_match *e, return 0; } -/* print a given ip including mask if neccessary */ +/* print a given ip including mask if necessary */ static void print_ip(const char *prefix, uint32_t ip, uint32_t mask, int invert) { @@ -1067,7 +1067,7 @@ static void print_ip(const char *prefix, uint32_t ip, printf("/%u.%u.%u.%u", IP_PARTS(mask)); } -/* We want this to be readable, so only print out neccessary fields. +/* We want this to be readable, so only print out necessary fields. * Because that's the kind of world I want to live in. */ void print_rule4(const struct ipt_entry *e, struct xtc_handle *h, const char *chain, int counters) @@ -1840,7 +1840,7 @@ int do_command4(int argc, char *argv[], char **table, if (!cs.target) { /* it is no chain, and we can't load a plugin. * We cannot know if the plugin is corrupt, non - * existant OR if the user just misspelled a + * existent OR if the user just misspelled a * chain. */ #ifdef IPT_F_GOTO if (cs.fw.ip.flags & IPT_F_GOTO) diff --git a/iptables/iptables.xslt b/iptables/iptables.xslt index d6a432c..afe6d0d 100644 --- a/iptables/iptables.xslt +++ b/iptables/iptables.xslt @@ -13,7 +13,7 @@ <!-- output conditions of a rule but not an action --> <xsl:template match="iptables-rules/table/chain/rule/conditions/*"> - <!-- <match> is the psuedo module when a match module doesn't need to be loaded + <!-- <match> is the pseudo module when a match module doesn't need to be loaded and when -m does not need to be inserted --> <xsl:if test="name() != 'match'"> <xsl:text> -m </xsl:text><xsl:value-of select="name()"/> diff --git a/libiptc/libiptc.c b/libiptc/libiptc.c index 9c07bb4..2c66d04 100644 --- a/libiptc/libiptc.c +++ b/libiptc/libiptc.c @@ -592,7 +592,7 @@ static int iptcc_chain_index_rebuild(struct xtc_handle *h) * There are different strategies, the simple and safe is to rebuild * the chain index every time. The more advanced is to update the * array index to point to the next element, but that requires some - * house keeping and boundry checks. The advanced is implemented, as + * house keeping and boundary checks. The advanced is implemented, as * the simple approach behaves badly when all chains are deleted * because list_for_each processing will always hit the first chain * index, thus causing a rebuild for every chain. diff --git a/libxtables/xtables.c b/libxtables/xtables.c index 5357d12..f14d503 100644 --- a/libxtables/xtables.c +++ b/libxtables/xtables.c @@ -1137,7 +1137,7 @@ void xtables_rule_matches_free(struct xtables_rule_match **matches) * * %XTF_BAD_VALUE: bad value for option * @p1: module name - * @p2: option with which the problem occured (e.g. "--mark") + * @p2: option with which the problem occurred (e.g. "--mark") * @p3: string the user passed in (e.g. "99999999999999") * * %XTF_ONE_ACTION: two mutually exclusive actions have been specified -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] iptables: Spelling fixes 2015-09-05 7:04 [PATCH] iptables: Spelling fixes Ville Skyttä @ 2015-09-05 21:07 ` Pablo Neira Ayuso 2015-09-06 6:22 ` Ville Skyttä 0 siblings, 1 reply; 8+ messages in thread From: Pablo Neira Ayuso @ 2015-09-05 21:07 UTC (permalink / raw) To: Ville Skyttä; +Cc: netfilter-devel On Sat, Sep 05, 2015 at 10:04:36AM +0300, Ville Skyttä wrote: > Signed-off-by: Ville Skyttä <ville.skytta@iki.fi> > --- > iptables/ip6tables.c | 6 +++--- > iptables/iptables-xml.c | 2 +- > iptables/iptables.c | 6 +++--- > iptables/iptables.xslt | 2 +- > libiptc/libiptc.c | 2 +- > libxtables/xtables.c | 2 +- > 6 files changed, 10 insertions(+), 10 deletions(-) > > diff --git a/iptables/ip6tables.c b/iptables/ip6tables.c > index 8db13b4..4a597b7 100644 > --- a/iptables/ip6tables.c > +++ b/iptables/ip6tables.c > @@ -1046,7 +1046,7 @@ static int print_match_save(const struct xt_entry_match *e, > return 0; > } > > -/* print a given ip including mask if neccessary */ > +/* print a given ip including mask if necessary */ > static void print_ip(const char *prefix, const struct in6_addr *ip, > const struct in6_addr *mask, int invert) > { > @@ -1067,7 +1067,7 @@ static void print_ip(const char *prefix, const struct in6_addr *ip, > printf("/%d", l); > } > > -/* We want this to be readable, so only print out neccessary fields. > +/* We want this to be readable, so only print out necessary fields. > * Because that's the kind of world I want to live in. */ While you're at it, would you also update the comment format for these? I mean: /* We want this to be readable, so only print out neccessary fields. * Because that's the kind of world I want to live in. */ The idea is to update only the comments that you have corrected. Thanks. -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] iptables: Spelling fixes 2015-09-05 21:07 ` Pablo Neira Ayuso @ 2015-09-06 6:22 ` Ville Skyttä 2015-09-06 7:15 ` Jan Engelhardt 0 siblings, 1 reply; 8+ messages in thread From: Ville Skyttä @ 2015-09-06 6:22 UTC (permalink / raw) To: netfilter-devel While at it, update comment format for the respective blocks. Signed-off-by: Ville Skyttä <ville.skytta@iki.fi> --- iptables/ip6tables.c | 15 +++++++++------ iptables/iptables-xml.c | 18 ++++++++++-------- iptables/iptables.c | 15 +++++++++------ iptables/iptables.xslt | 2 +- libiptc/libiptc.c | 2 +- libxtables/xtables.c | 2 +- 6 files changed, 31 insertions(+), 23 deletions(-) diff --git a/iptables/ip6tables.c b/iptables/ip6tables.c index 8db13b4..5a6699d 100644 --- a/iptables/ip6tables.c +++ b/iptables/ip6tables.c @@ -1046,7 +1046,8 @@ static int print_match_save(const struct xt_entry_match *e, return 0; } -/* print a given ip including mask if neccessary */ +/* Print a given ip including mask if necessary. + */ static void print_ip(const char *prefix, const struct in6_addr *ip, const struct in6_addr *mask, int invert) { @@ -1067,8 +1068,9 @@ static void print_ip(const char *prefix, const struct in6_addr *ip, printf("/%d", l); } -/* We want this to be readable, so only print out neccessary fields. - * Because that's the kind of world I want to live in. */ +/* We want this to be readable, so only print out necessary fields. + * Because that's the kind of world I want to live in. + */ void print_rule6(const struct ip6t_entry *e, struct xtc_handle *h, const char *chain, int counters) { @@ -1840,10 +1842,11 @@ int do_command6(int argc, char *argv[], char **table, } if (!cs.target) { - /* it is no chain, and we can't load a plugin. + /* It is no chain, and we can't load a plugin. * We cannot know if the plugin is corrupt, non - * existant OR if the user just misspelled a - * chain. */ + * existent OR if the user just misspelled a + * chain. + */ #ifdef IP6T_F_GOTO if (cs.fw6.ipv6.flags & IP6T_F_GOTO) xtables_error(PARAMETER_PROBLEM, diff --git a/iptables/iptables-xml.c b/iptables/iptables-xml.c index 7461412..740a563 100644 --- a/iptables/iptables-xml.c +++ b/iptables/iptables-xml.c @@ -131,8 +131,9 @@ free_argv(void) oldargc = 0; } -/* save parsed rule for comparison with next rule - to perform action agregation on duplicate conditions */ +/* Save parsed rule for comparison with next rule to perform action aggregation + * on duplicate conditions. + */ static void save_argv(void) { @@ -527,12 +528,13 @@ do_rule_part(char *leveltag1, char *leveltag2, int part, int argc, static int compareRules(void) { - /* compare arguments up to -j or -g for match. - NOTE: We don't want to combine actions if there were no criteria - in each rule, or rules didn't have an action - NOTE: Depends on arguments being in some kind of "normal" order which - is the case when processing the ACTUAL output of actual iptables-save - rather than a file merely in a compatable format */ + /* Compare arguments up to -j or -g for match. + * NOTE: We don't want to combine actions if there were no criteria + * in each rule, or rules didn't have an action. + * NOTE: Depends on arguments being in some kind of "normal" order which + * is the case when processing the ACTUAL output of actual iptables-save + * rather than a file merely in a compatible format. + */ unsigned int old = 0; unsigned int new = 0; diff --git a/iptables/iptables.c b/iptables/iptables.c index 88953c4..4ff9053 100644 --- a/iptables/iptables.c +++ b/iptables/iptables.c @@ -1037,7 +1037,8 @@ static int print_match_save(const struct xt_entry_match *e, return 0; } -/* print a given ip including mask if neccessary */ +/* Print a given ip including mask if necessary. + */ static void print_ip(const char *prefix, uint32_t ip, uint32_t mask, int invert) { @@ -1067,8 +1068,9 @@ static void print_ip(const char *prefix, uint32_t ip, printf("/%u.%u.%u.%u", IP_PARTS(mask)); } -/* We want this to be readable, so only print out neccessary fields. - * Because that's the kind of world I want to live in. */ +/* We want this to be readable, so only print out necessary fields. + * Because that's the kind of world I want to live in. + */ void print_rule4(const struct ipt_entry *e, struct xtc_handle *h, const char *chain, int counters) { @@ -1838,10 +1840,11 @@ int do_command4(int argc, char *argv[], char **table, } if (!cs.target) { - /* it is no chain, and we can't load a plugin. + /* It is no chain, and we can't load a plugin. * We cannot know if the plugin is corrupt, non - * existant OR if the user just misspelled a - * chain. */ + * existent OR if the user just misspelled a + * chain. + */ #ifdef IPT_F_GOTO if (cs.fw.ip.flags & IPT_F_GOTO) xtables_error(PARAMETER_PROBLEM, diff --git a/iptables/iptables.xslt b/iptables/iptables.xslt index d6a432c..afe6d0d 100644 --- a/iptables/iptables.xslt +++ b/iptables/iptables.xslt @@ -13,7 +13,7 @@ <!-- output conditions of a rule but not an action --> <xsl:template match="iptables-rules/table/chain/rule/conditions/*"> - <!-- <match> is the psuedo module when a match module doesn't need to be loaded + <!-- <match> is the pseudo module when a match module doesn't need to be loaded and when -m does not need to be inserted --> <xsl:if test="name() != 'match'"> <xsl:text> -m </xsl:text><xsl:value-of select="name()"/> diff --git a/libiptc/libiptc.c b/libiptc/libiptc.c index 9c07bb4..2c66d04 100644 --- a/libiptc/libiptc.c +++ b/libiptc/libiptc.c @@ -592,7 +592,7 @@ static int iptcc_chain_index_rebuild(struct xtc_handle *h) * There are different strategies, the simple and safe is to rebuild * the chain index every time. The more advanced is to update the * array index to point to the next element, but that requires some - * house keeping and boundry checks. The advanced is implemented, as + * house keeping and boundary checks. The advanced is implemented, as * the simple approach behaves badly when all chains are deleted * because list_for_each processing will always hit the first chain * index, thus causing a rebuild for every chain. diff --git a/libxtables/xtables.c b/libxtables/xtables.c index 5357d12..f14d503 100644 --- a/libxtables/xtables.c +++ b/libxtables/xtables.c @@ -1137,7 +1137,7 @@ void xtables_rule_matches_free(struct xtables_rule_match **matches) * * %XTF_BAD_VALUE: bad value for option * @p1: module name - * @p2: option with which the problem occured (e.g. "--mark") + * @p2: option with which the problem occurred (e.g. "--mark") * @p3: string the user passed in (e.g. "99999999999999") * * %XTF_ONE_ACTION: two mutually exclusive actions have been specified -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] iptables: Spelling fixes 2015-09-06 6:22 ` Ville Skyttä @ 2015-09-06 7:15 ` Jan Engelhardt 2015-09-06 7:30 ` Ville Skyttä 2015-09-07 18:28 ` Pablo Neira Ayuso 0 siblings, 2 replies; 8+ messages in thread From: Jan Engelhardt @ 2015-09-06 7:15 UTC (permalink / raw) To: Ville Skyttä; +Cc: netfilter-devel On Sunday 2015-09-06 08:22, Ville Skyttä wrote: > >-/* print a given ip including mask if neccessary */ >+/* Print a given ip including mask if necessary. >+ */ > static void print_ip(const char *prefix, const struct in6_addr *ip, > const struct in6_addr *mask, int invert) > { Hm that really looks worse than it did before. -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] iptables: Spelling fixes 2015-09-06 7:15 ` Jan Engelhardt @ 2015-09-06 7:30 ` Ville Skyttä 2015-09-06 18:21 ` Jozsef Kadlecsik 2015-09-07 18:28 ` Pablo Neira Ayuso 1 sibling, 1 reply; 8+ messages in thread From: Ville Skyttä @ 2015-09-06 7:30 UTC (permalink / raw) To: Jan Engelhardt; +Cc: netfilter-devel On Sun, Sep 6, 2015 at 10:15 AM, Jan Engelhardt <jengelh@inai.de> wrote: > > On Sunday 2015-09-06 08:22, Ville Skyttä wrote: >> >>-/* print a given ip including mask if neccessary */ >>+/* Print a given ip including mask if necessary. >>+ */ >> static void print_ip(const char *prefix, const struct in6_addr *ip, >> const struct in6_addr *mask, int invert) >> { > > Hm that really looks worse than it did before. Well, I believe it matches the instructions for block formatting I was given by Pablo. If it doesn't, I suggest applying my original patch which didn't do anything but the spelling fixes -- I'm not going to spend any more time on this. -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] iptables: Spelling fixes 2015-09-06 7:30 ` Ville Skyttä @ 2015-09-06 18:21 ` Jozsef Kadlecsik 2015-09-07 9:49 ` Ville Skyttä 0 siblings, 1 reply; 8+ messages in thread From: Jozsef Kadlecsik @ 2015-09-06 18:21 UTC (permalink / raw) To: Ville Skyttä; +Cc: Jan Engelhardt, netfilter-devel [-- Attachment #1: Type: TEXT/PLAIN, Size: 1194 bytes --] On Sun, 6 Sep 2015, Ville Skyttä wrote: > On Sun, Sep 6, 2015 at 10:15 AM, Jan Engelhardt <jengelh@inai.de> wrote: > > > > On Sunday 2015-09-06 08:22, Ville Skyttä wrote: > >> > >>-/* print a given ip including mask if neccessary */ > >>+/* Print a given ip including mask if necessary. > >>+ */ > >> static void print_ip(const char *prefix, const struct in6_addr *ip, > >> const struct in6_addr *mask, int invert) > >> { > > > > Hm that really looks worse than it did before. > > Well, I believe it matches the instructions for block formatting I was > given by Pablo. No, it does not. > If it doesn't, I suggest applying my original patch which didn't do > anything but the spelling fixes -- I'm not going to spend any more time > on this. Your original patch does not follow either the comment styles for files under net/, therefore was you asked to fix it. Best regards, Jozsef - E-mail : kadlec@blackhole.kfki.hu, kadlecsik.jozsef@wigner.mta.hu PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences H-1525 Budapest 114, POB. 49, Hungary ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] iptables: Spelling fixes 2015-09-06 18:21 ` Jozsef Kadlecsik @ 2015-09-07 9:49 ` Ville Skyttä 0 siblings, 0 replies; 8+ messages in thread From: Ville Skyttä @ 2015-09-07 9:49 UTC (permalink / raw) To: Jozsef Kadlecsik; +Cc: netfilter-devel On Sun, Sep 6, 2015 at 9:21 PM, Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> wrote: > On Sun, 6 Sep 2015, Ville Skyttä wrote: > >> If it doesn't, I suggest applying my original patch which didn't do >> anything but the spelling fixes -- I'm not going to spend any more time >> on this. > > Your original patch does not follow either the comment styles for files > under net/, therefore was you asked to fix it. This is getting more and more confusing to me. My patch does not touch any files under net/, nor is there a net/ directory in the iptables repository in the first place as far as I can tell. My original patch follows whatever the comment style was in the files/blocks touched, it just fixes spelling errors. If people want the style changed, I think the most productive use of everyone's time would be if someone who actually knows what the desired comment style is would either apply my original patch as-is and then do the desired style changes on top of that. Or just reject my patch and make or don't make the style changes, but I don't think this discussion is on a very productive track. I'm going to do my part and shut up now, sorry about the noise :) -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] iptables: Spelling fixes 2015-09-06 7:15 ` Jan Engelhardt 2015-09-06 7:30 ` Ville Skyttä @ 2015-09-07 18:28 ` Pablo Neira Ayuso 1 sibling, 0 replies; 8+ messages in thread From: Pablo Neira Ayuso @ 2015-09-07 18:28 UTC (permalink / raw) To: Jan Engelhardt; +Cc: Ville Skyttä, netfilter-devel On Sun, Sep 06, 2015 at 09:15:51AM +0200, Jan Engelhardt wrote: > > On Sunday 2015-09-06 08:22, Ville Skyttä wrote: > > > >-/* print a given ip including mask if neccessary */ > >+/* Print a given ip including mask if necessary. > >+ */ > > static void print_ip(const char *prefix, const struct in6_addr *ip, > > const struct in6_addr *mask, int invert) > > { > > Hm that really looks worse than it did before. It's not so bad. I have manually mangled the patch so it sticks to the format when the comments fit into one line, ie. +/* Print a given ip including mask if necessary. */ @Ville: I forgot to indicate that comments that fit into one line look like above. The format below ... /* ... Only applies when the comment that doesn't it into one line for * whatever reason. */ I hope it clarifies. So applied, thanks for following up Ville. -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-09-07 18:22 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-09-05 7:04 [PATCH] iptables: Spelling fixes Ville Skyttä 2015-09-05 21:07 ` Pablo Neira Ayuso 2015-09-06 6:22 ` Ville Skyttä 2015-09-06 7:15 ` Jan Engelhardt 2015-09-06 7:30 ` Ville Skyttä 2015-09-06 18:21 ` Jozsef Kadlecsik 2015-09-07 9:49 ` Ville Skyttä 2015-09-07 18:28 ` Pablo Neira Ayuso
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).