Skip to content
Browse files

Change commit int/uint to just uint

  • Loading branch information...
1 parent d3aa58d commit 2e48cd42be36a8fe42c549323fda168686678261 Marcus Clyne committed Oct 12, 2010
Showing with 9 additions and 6 deletions.
  1. +5 −3 src/ndk_conf_file.c
  2. +4 −3 src/ndk_string.c
View
8 src/ndk_conf_file.c
@@ -146,8 +146,8 @@ ndk_conf_set_str_array_multi_slot (ngx_conf_t *cf, ngx_command_t *cmd, void *con
ngx_str_t *value, *s;
ngx_array_t **a;
ngx_conf_post_t *post;
- ngx_int_t i;
-
+ ngx_uint_t i;
+
a = (ngx_array_t **) (p + cmd->offset);
if (*a == NGX_CONF_UNSET_PTR) {
@@ -157,7 +157,9 @@ ndk_conf_set_str_array_multi_slot (ngx_conf_t *cf, ngx_command_t *cmd, void *con
}
}
- for (i=1; i<cf->args->nelts; i++) {
+ s = NULL;
+
+ for (i=cf->args->nelts-1; i; i--) {
s = ngx_array_push(*a);
if (s == NULL) {
View
7 src/ndk_string.c
@@ -28,13 +28,14 @@ ndk_atoi64 (u_char *line, size_t n)
ngx_int_t
ndk_strcntc (ngx_str_t *s, char c)
{
- ngx_int_t i, n;
+ ngx_int_t n;
+ size_t i;
u_char *p;
- n = s->len;
+ i = s->len;
p = s->data;
- for (i=0; i<s->len; i++, p++) {
+ for (n=0; i; i--, p++) {
if (*p == (u_char) c)
n++;

0 comments on commit 2e48cd4

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