Permalink
Browse files

minor coding style fixes.

  • Loading branch information...
agentzh committed Oct 10, 2011
1 parent 25ce276 commit 7e6f961cf07be5777c7eed540cee8ea3ee71b1d7
Showing with 7 additions and 5 deletions.
  1. +1 −1 .gitignore
  2. +6 −4 src/ngx_http_set_hashed_upstream.c
View
@@ -60,4 +60,4 @@ buildroot/
src/module.h
work/
src/random.[ch]
-build10
+build1[01]
@@ -1,10 +1,11 @@
+#ifndef DDEBUG
#define DDEBUG 0
+#endif
#include "ddebug.h"
#include "ngx_http_set_hashed_upstream.h"
-
ngx_uint_t
ngx_http_set_misc_apply_distribution(ngx_log_t *log, ngx_uint_t hash,
ndk_upstream_list_t *ul, ngx_http_set_misc_distribution_t type)
@@ -34,14 +35,14 @@ ngx_http_set_misc_set_hashed_upstream(ngx_http_request_t *r,
ngx_str_t ulname;
ngx_uint_t hash, index;
ngx_http_variable_value_t *key;
-
+
if (ul == NULL) {
ulname.data = v->data;
ulname.len = v->len;
dd("ulname: %.*s", ulname.len, ulname.data);
-
- ul = ndk_get_upstream_list(ndk_http_get_main_conf(r),
+
+ ul = ndk_get_upstream_list(ndk_http_get_main_conf(r),
ulname.data, ulname.len);
if (ul == NULL) {
@@ -137,3 +138,4 @@ ngx_http_set_hashed_upstream(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
return ndk_set_var_value_core(cf, var, v, &filter);
}
+

0 comments on commit 7e6f961

Please sign in to comment.