aboutsummaryrefslogtreecommitdiff
path: root/docs/examples/http2-serverpush.c
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples/http2-serverpush.c')
-rw-r--r--docs/examples/http2-serverpush.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/examples/http2-serverpush.c b/docs/examples/http2-serverpush.c
index b497e76a9..8e8007520 100644
--- a/docs/examples/http2-serverpush.c
+++ b/docs/examples/http2-serverpush.c
@@ -45,7 +45,7 @@ void dump(const char *text, unsigned char *ptr, size_t size,
size_t i;
size_t c;
- unsigned int width=0x10;
+ unsigned int width = 0x10;
if(nohex)
/* without the hex output, we can fit more on screen */
@@ -54,7 +54,7 @@ void dump(const char *text, unsigned char *ptr, size_t size,
fprintf(stderr, "%s, %ld bytes (0x%lx)\n",
text, (long)size, (long)size);
- for(i=0; i<size; i+= width) {
+ for(i = 0; i<size; i+= width) {
fprintf(stderr, "%4.4lx: ", (long)i);
@@ -69,14 +69,14 @@ void dump(const char *text, unsigned char *ptr, size_t size,
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) {
+ if(nohex && (i+c+1 < size) && ptr[i+c] == 0x0D && ptr[i+c+1] == 0x0A) {
i+=(c+2-width);
break;
}
fprintf(stderr, "%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) {
+ if(nohex && (i+c+2 < size) && ptr[i+c+1] == 0x0D && ptr[i+c+2] == 0x0A) {
i+=(c+3-width);
break;
}
@@ -181,7 +181,7 @@ static int server_push_callback(CURL *parent,
fprintf(stderr, "**** push callback approves stream %u, got %d headers!\n",
count, (int)num_headers);
- for(i=0; i<num_headers; i++) {
+ for(i = 0; i<num_headers; i++) {
headp = curl_pushheader_bynum(headers, i);
fprintf(stderr, "**** header %u: %s\n", (int)i, headp);
}
@@ -204,7 +204,7 @@ int main(void)
CURL *easy;
CURLM *multi_handle;
int still_running; /* keep number of running handles */
- int transfers=1; /* we start with one */
+ int transfers = 1; /* we start with one */
struct CURLMsg *m;
/* init a multi stack */