From 8b625177ba69985be6673e776c54f45ab8d40e58 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 14 Jun 2016 14:31:37 -0700 Subject: [PATCH] pedit: fix whitespace etc Minor changes from checkpatch --- tc/m_pedit.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/tc/m_pedit.c b/tc/m_pedit.c index d276ba04..64533060 100644 --- a/tc/m_pedit.c +++ b/tc/m_pedit.c @@ -37,10 +37,12 @@ static void explain(void) fprintf(stderr, "Usage: ... pedit munge [CONTROL]\n"); fprintf(stderr, "Where: MUNGE := |\n" - "\t:= [ATC]\n \t\tOFFSETC:= offset \n " - "\t\tATC:= at offmask shift \n \t\tNOTE: offval is byte offset, must be multiple of 4\n " - "\t\tNOTE: maskval is a 32 bit hex number\n \t\tNOTE: shiftval is a is a shift value\n " - "\t\tCMD:= clear | invert | set | retain\n \t:= ip | ip6 \n " + "\t:= [ATC]\n \t\tOFFSETC:= offset \n" + "\t\tATC:= at offmask shift \n" + "\t\tNOTE: offval is byte offset, must be multiple of 4\n" + "\t\tNOTE: maskval is a 32 bit hex number\n \t\tNOTE: shiftval is a is a shift value\n" + "\t\tCMD:= clear | invert | set | retain\n" + "\t:= ip | ip6 \n" " \t\t| udp | tcp | icmp \n" "\tCONTROL:= reclassify | pipe | drop | continue | pass\n" "For Example usage look at the examples directory\n"); @@ -207,7 +209,7 @@ int pack_key8(__u32 retain, struct tc_pedit_sel *sel, struct tc_pedit_key *tkey) return pack_key(sel, tkey); } -int parse_val(int *argc_p, char ***argv_p, __u32 * val, int type) +int parse_val(int *argc_p, char ***argv_p, __u32 *val, int type) { int argc = *argc_p; char **argv = *argv_p; @@ -224,16 +226,15 @@ int parse_val(int *argc_p, char ***argv_p, __u32 * val, int type) if (type == TIPV4) { inet_prefix addr; - if (get_prefix_1(&addr, *argv, AF_INET)) { + if (get_prefix_1(&addr, *argv, AF_INET)) return -1; - } + *val = addr.data[0]; return 0; } - if (type == TIPV6) { - /* not implemented yet */ - return -1; - } + + if (type == TIPV6) + return -1; /* not implemented yet */ return -1; }