aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest/lib552.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-09-09 23:55:08 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-09-11 09:29:50 +0200
commite5743f08e7efb387bb39c0dc28f36838ece3bc1e (patch)
treeb0237e17762f3be2bb6f8cf53fea1491a2c731ad /tests/libtest/lib552.c
parentca86006debc4570bbb3eacb71965c9d59be14084 (diff)
code style: use spaces around pluses
Diffstat (limited to 'tests/libtest/lib552.c')
-rw-r--r--tests/libtest/lib552.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/tests/libtest/lib552.c b/tests/libtest/lib552.c
index e42ba34f9..5082eb044 100644
--- a/tests/libtest/lib552.c
+++ b/tests/libtest/lib552.c
@@ -48,30 +48,32 @@ void dump(const char *text,
fprintf(stream, "%s, %d bytes (0x%x)\n", text, (int)size, (int)size);
- for(i = 0; i<size; i+= width) {
+ for(i = 0; i<size; i += width) {
fprintf(stream, "%04x: ", (int)i);
if(!nohex) {
/* hex not disabled, show it */
for(c = 0; c < width; c++)
- if(i+c < size)
- fprintf(stream, "%02x ", ptr[i+c]);
+ if(i + c < size)
+ fprintf(stream, "%02x ", ptr[i + c]);
else
fputs(" ", stream);
}
- for(c = 0; (c < width) && (i+c < size); c++) {
+ for(c = 0; (c < width) && (i + c < size); c++) {
/* check for 0D0A; if found, skip past and start a new line of output */
- if(nohex && (i+c+1 < size) && ptr[i+c] == 0x0D && ptr[i+c+1] == 0x0A) {
- i+=(c+2-width);
+ if(nohex && (i + c + 1 < size) && ptr[i + c] == 0x0D &&
+ ptr[i + c + 1] == 0x0A) {
+ i += (c + 2 - width);
break;
}
fprintf(stream, "%c",
- (ptr[i+c] >= 0x20) && (ptr[i+c]<0x80)?ptr[i+c]:'.');
+ (ptr[i + c] >= 0x20) && (ptr[i + c]<0x80)? ptr[i + c] : '.');
/* check again for 0D0A, to avoid an extra \n if it's at width */
- if(nohex && (i+c+2 < size) && ptr[i+c+1] == 0x0D && ptr[i+c+2] == 0x0A) {
- i+=(c+3-width);
+ if(nohex && (i + c + 2 < size) && ptr[i + c + 1] == 0x0D &&
+ ptr[i + c + 2] == 0x0A) {
+ i += (c + 3 - width);
break;
}
}