Skip to content
Browse files

coding style fixes.

  • Loading branch information...
1 parent 4cfa6c4 commit 40034f82ce0ff80bf57863e629036f2c130b940f @agentzh committed Oct 26, 2013
Showing with 16 additions and 11 deletions.
  1. +14 −9 src/ngx_http_chunkin_request_body.c
  2. +2 −2 src/ngx_http_chunkin_util.c
View
23 src/ngx_http_chunkin_request_body.c
@@ -1,6 +1,13 @@
-/* Copyright (C) agentzh */
+/*
+ * Copyright (C) Yichun Zhang (agentzh)
+ */
+
+
+#ifndef DDEBUG
#define DDEBUG 0
+#endif
+
#include "ddebug.h"
@@ -9,20 +16,19 @@
#include "ngx_http_chunkin_filter_module.h"
#include "ngx_http_chunkin_request_body.h"
+
enum {
MAX_CHUNKS_PER_DISK_WRITE = 512
};
-static ngx_int_t ngx_http_test_expect(ngx_http_request_t *r);
+static ngx_int_t ngx_http_test_expect(ngx_http_request_t *r);
static void ngx_http_chunkin_read_chunked_request_body_handler(
- ngx_http_request_t *r);
-
+ ngx_http_request_t *r);
static ngx_int_t ngx_http_chunkin_do_read_chunked_request_body(
- ngx_http_request_t *r);
-
+ ngx_http_request_t *r);
static ngx_int_t ngx_http_write_request_body(ngx_http_request_t *r,
- ngx_chain_t *body, int chain_count);
+ ngx_chain_t *body, int chain_count);
/* this function's implementation is borrowed from nginx 0.8.20
@@ -511,7 +517,7 @@ ngx_http_chunkin_do_read_chunked_request_body(ngx_http_request_t *r)
rb->bufs->buf = b;
- } else if ( r->request_body_in_single_buf ) {
+ } else if (r->request_body_in_single_buf) {
dd("request body in single buf");
/* XXX we may not have to allocate a big buffer here */
@@ -725,4 +731,3 @@ ngx_http_write_request_body(ngx_http_request_t *r, ngx_chain_t *body,
return NGX_OK;
}
-
View
4 src/ngx_http_chunkin_util.c
@@ -205,7 +205,7 @@ ngx_http_chunkin_restart_request(ngx_http_request_t *r,
dd("DISCARD BODY: %d", (int)r->discard_body);
- if ( ! ctx->r_discard_body ) {
+ if (!ctx->r_discard_body) {
r->main->count++;
}
@@ -413,7 +413,7 @@ ngx_http_chunkin_internal_redirect(ngx_http_request_t *r,
dd("DISCARD BODY: %d", (int)r->discard_body);
- if ( ! ctx->r_discard_body ) {
+ if (!ctx->r_discard_body) {
r->main->count++;
}

0 comments on commit 40034f8

Please sign in to comment.
Something went wrong with that request. Please try again.