Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

minor coding style fixes.

  • Loading branch information...
commit 7e6f961cf07be5777c7eed540cee8ea3ee71b1d7 1 parent 25ce276
@agentzh agentzh authored
Showing with 7 additions and 5 deletions.
  1. +1 −1  .gitignore
  2. +6 −4 src/ngx_http_set_hashed_upstream.c
View
2  .gitignore
@@ -60,4 +60,4 @@ buildroot/
src/module.h
work/
src/random.[ch]
-build10
+build1[01]
View
10 src/ngx_http_set_hashed_upstream.c
@@ -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);
}
+
Please sign in to comment.
Something went wrong with that request. Please try again.