summaryrefslogtreecommitdiffstats
path: root/hdlcutil
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2013-06-05 02:34:19 +0200
committerRalf Baechle <ralf@linux-mips.org>2013-06-17 17:17:29 +0200
commit4eb951133d9d301184ebd7b675598e11973b6ab8 (patch)
treed7647d95c75ee826eb6879c69206d689f900f3b8 /hdlcutil
parent1c830798fe54268cc0f9585b5940bea47fa8eb8a (diff)
Always have a space between if, for, switch, while and the following `('.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'hdlcutil')
-rw-r--r--hdlcutil/sethdlc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/hdlcutil/sethdlc.c b/hdlcutil/sethdlc.c
index a9f16b3..657eed6 100644
--- a/hdlcutil/sethdlc.c
+++ b/hdlcutil/sethdlc.c
@@ -101,11 +101,11 @@ static void display_packet(unsigned char *bp, unsigned int len)
cmd = (bp[6] & 0x80);
}
printf("fm ");
- for(i = 7; i < 13; i++)
+ for (i = 7; i < 13; i++)
if ((bp[i] &0xfe) != 0x40)
printf("%c",bp[i] >> 1);
printf("-%u to ",(bp[13] >> 1) & 0xf);
- for(i = 0; i < 6; i++)
+ for (i = 0; i < 6; i++)
if ((bp[i] &0xfe) != 0x40)
printf("%c", bp[i] >> 1);
printf("-%u", (bp[6] >> 1) & 0xf);
@@ -114,7 +114,7 @@ static void display_packet(unsigned char *bp, unsigned int len)
if ((!(bp[-1] & 1)) && (len >= 7))
printf(" via ");
while ((!(bp[-1] & 1)) && (len >= 7)) {
- for(i = 0; i < 6; i++)
+ for (i = 0; i < 6; i++)
if ((bp[i] &0xfe) != 0x40)
printf("%c",bp[i] >> 1);
printf("-%u",(bp[6] >> 1) & 0xf);
@@ -124,7 +124,7 @@ static void display_packet(unsigned char *bp, unsigned int len)
printf(",");
}
}
- if(!len)
+ if (!len)
return;
i = *bp++;
len--;
@@ -216,7 +216,7 @@ static void print_bits(int (*bitproc)(void))
char str[9];
char *cp;
- for(;;) {
+ for (;;) {
ret = bitproc();
if (ret < 0) {
if (errno == EAGAIN)
@@ -226,7 +226,7 @@ static void print_bits(int (*bitproc)(void))
return;
}
strcpy(cp = str, "00000000");
- for(i = 0; i < 8; i++, cp++, ret >>= 1)
+ for (i = 0; i < 8; i++, cp++, ret >>= 1)
*cp += (ret & 1);
printf("%s", str);
}