From 1245fbd2a8d60bab7b16b8a1d3c0122fee72f53f Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 5 Jun 2013 00:57:38 +0200 Subject: Nuke trailing whitespace. Signed-off-by: Ralf Baechle --- ax25/bpqparms.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'ax25/bpqparms.c') diff --git a/ax25/bpqparms.c b/ax25/bpqparms.c index f8e9d66..c5e12ad 100644 --- a/ax25/bpqparms.c +++ b/ax25/bpqparms.c @@ -1,19 +1,19 @@ -/* +/* bpqparms.c Copyright 1996, by Joerg Reuter jreuter@poboxes.com - This program is free software; you can redistribute it and/or modify - it under the terms of the (modified) GNU General Public License + This program is free software; you can redistribute it and/or modify + it under the terms of the (modified) GNU General Public License delivered with the LinuX kernel source. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should find a copy of the GNU General Public License in - /usr/src/linux/COPYING; + You should find a copy of the GNU General Public License in + /usr/src/linux/COPYING; */ @@ -54,9 +54,9 @@ int get_hwaddr(unsigned char *k, char *s) if (strcmp(s, "default") == 0 || strcmp(s, "broadcast") == 0) { memcpy(k, broadcast, ETH_ALEN); } else { - n = sscanf(s, "%x:%x:%x:%x:%x:%x", + n = sscanf(s, "%x:%x:%x:%x:%x:%x", ð[0], ð[1], ð[2], ð[3], ð[4], ð[5]); - + if (n < 6) return 1; @@ -86,7 +86,7 @@ int main(int argc, char **argv) return 1; } break; - + case 'a': flag |= 2; if (get_hwaddr(addr.accept, optarg)) { @@ -117,26 +117,26 @@ int main(int argc, char **argv) usage(); } } - + if (!(flag & 0x01) || optind+1 > argc) usage(); - + strcpy(dev, argv[optind]); if ((flag & 0x02) == 0) memcpy(addr.accept, addr.destination, ETH_ALEN); fd = socket(AF_INET, SOCK_DGRAM, 0); - + strcpy(ifr.ifr_name, dev); ifr.ifr_data = (caddr_t) &addr; - + if (ioctl(fd, SIOCSBPQETHADDR, &ifr) < 0) { perror("bpqparms SIOCSBPQETHADDR"); close(fd); return 1; } - + close(fd); return 0; -- cgit v1.2.3 From 1c830798fe54268cc0f9585b5940bea47fa8eb8a Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 5 Jun 2013 02:20:15 +0200 Subject: Remove parenthesis around arguments of return statements. Signed-off-by: Ralf Baechle --- ax25/bpqparms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ax25/bpqparms.c') diff --git a/ax25/bpqparms.c b/ax25/bpqparms.c index c5e12ad..590ab61 100644 --- a/ax25/bpqparms.c +++ b/ax25/bpqparms.c @@ -109,7 +109,7 @@ int main(int argc, char **argv) case 'v': printf("bpqparms: %s\n", VERSION); - return(0); + return 0; case 'h': case ':': -- cgit v1.2.3 From f76e0b330f0be28f9f3af3073904ede3a34d48f5 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 5 Jun 2013 15:34:56 +0200 Subject: Reformat consistently. Strictly whitespace changes only. Indentation by tabs only. Move case labels in switches are on the same level as the switch keyword. Signed-off-by: Ralf Baechle --- ax25/bpqparms.c | 72 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'ax25/bpqparms.c') diff --git a/ax25/bpqparms.c b/ax25/bpqparms.c index 590ab61..83734a8 100644 --- a/ax25/bpqparms.c +++ b/ax25/bpqparms.c @@ -79,42 +79,42 @@ int main(int argc, char **argv) while ((cmd = getopt(argc, argv, "d:a:vVh")) != EOF) { switch (cmd) { - case 'd': - flag |= 1; - if (get_hwaddr(addr.destination, optarg)) { - fprintf(stderr, "bpqparms: invalid 'destination' address %s\n", optarg); - return 1; - } - break; - - case 'a': - flag |= 2; - if (get_hwaddr(addr.accept, optarg)) { - fprintf(stderr, "bpqparms: invalid 'accept' address %s\n", optarg); - return 1; - } - break; - - case 'V': - printf("bpqparms version " VERSION "\n"); - printf("Copyright 1996, Jörg Reuter (jreuter@poboxes.com)\n"); - printf("This program is free software; you can redistribute it and/or modify\n"); - printf("it under the terms of the GNU General Public License as published by\n"); - printf("the Free Software Foundation; either version 2 of the License, or\n"); - printf(" (at your option) any later version.\n\n"); - printf("This program is distributed in the hope that it will be useful,\n"); - printf("but WITHOUT ANY WARRANTY; without even the implied warranty of\n"); - printf("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"); - return 0; - - case 'v': - printf("bpqparms: %s\n", VERSION); - return 0; - - case 'h': - case ':': - case '?': - usage(); + case 'd': + flag |= 1; + if (get_hwaddr(addr.destination, optarg)) { + fprintf(stderr, "bpqparms: invalid 'destination' address %s\n", optarg); + return 1; + } + break; + + case 'a': + flag |= 2; + if (get_hwaddr(addr.accept, optarg)) { + fprintf(stderr, "bpqparms: invalid 'accept' address %s\n", optarg); + return 1; + } + break; + + case 'V': + printf("bpqparms version " VERSION "\n"); + printf("Copyright 1996, Jörg Reuter (jreuter@poboxes.com)\n"); + printf("This program is free software; you can redistribute it and/or modify\n"); + printf("it under the terms of the GNU General Public License as published by\n"); + printf("the Free Software Foundation; either version 2 of the License, or\n"); + printf(" (at your option) any later version.\n\n"); + printf("This program is distributed in the hope that it will be useful,\n"); + printf("but WITHOUT ANY WARRANTY; without even the implied warranty of\n"); + printf("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"); + return 0; + + case 'v': + printf("bpqparms: %s\n", VERSION); + return 0; + + case 'h': + case ':': + case '?': + usage(); } } -- cgit v1.2.3