]> git.kaiwu.me - nginx.git/commitdiff
use ngx_uint_t instead of int,
authorIgor Sysoev <igor@sysoev.ru>
Thu, 15 Oct 2009 13:09:58 +0000 (13:09 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Thu, 15 Oct 2009 13:09:58 +0000 (13:09 +0000)
strange to say this reduce function size by 16 bytes

src/http/ngx_http_parse_time.c

index 23fc2385426f5087e66781e1dfe516741674743c..5ecfc8295856c209c31d3b629def9f324b6382d8 100644 (file)
@@ -8,13 +8,14 @@
 #include <ngx_core.h>
 
 
-static int mday[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
+static ngx_uint_t  mday[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
 
 time_t
 ngx_http_parse_time(u_char *value, size_t len)
 {
-    u_char  *p, *end;
-    int      day, month, year, hour, min, sec;
+    u_char      *p, *end;
+    ngx_int_t    month;
+    ngx_uint_t   day, year, hour, min, sec;
     enum {
         no = 0,
         rfc822,   /* Tue, 10 Nov 2002 23:50:13   */