From e5743f08e7efb387bb39c0dc28f36838ece3bc1e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 9 Sep 2017 23:55:08 +0200 Subject: code style: use spaces around pluses --- docs/examples/http2-upload.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'docs/examples/http2-upload.c') diff --git a/docs/examples/http2-upload.c b/docs/examples/http2-upload.c index 2e0ecb3ce..d7aa320ed 100644 --- a/docs/examples/http2-upload.c +++ b/docs/examples/http2-upload.c @@ -75,30 +75,32 @@ void dump(const char *text, int num, unsigned char *ptr, size_t size, fprintf(stderr, "%d %s, %ld bytes (0x%lx)\n", num, text, (long)size, (long)size); - for(i = 0; i= 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; } } @@ -333,7 +335,7 @@ int main(int argc, char **argv) else { /* Note that on some platforms 'timeout' may be modified by select(). If you need access to the original value save a copy beforehand. */ - rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); + rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout); } switch(rc) { -- cgit v1.2.3