Skip to content

Commit

Permalink
Compatibility: changed for issues/27 that ngx_vhost_traffic_status_gr…
Browse files Browse the repository at this point in the history
…oup_to_string() macro is an error when using -Wstring-plus-int at clang compiler.
  • Loading branch information
vozlt committed Nov 22, 2015
1 parent e96b9ce commit d6b04f9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ngx_http_vhost_traffic_status_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#define NGX_HTTP_VHOST_TRAFFIC_STATUS_UPSTREAM_CC 3
#define NGX_HTTP_VHOST_TRAFFIC_STATUS_UPSTREAM_FG 4

#define NGX_HTTP_VHOST_TRAFFIC_STATUS_UPSTREAMS (u_char *) "NO\0UA\0UG\0CC\0FG\0"

#define NGX_HTTP_VHOST_TRAFFIC_STATUS_NODE_NONE 0
#define NGX_HTTP_VHOST_TRAFFIC_STATUS_NODE_FIND 1

Expand Down Expand Up @@ -337,8 +339,8 @@

#define ngx_vhost_traffic_status_group_to_string(n) (u_char *) ( \
(n > 4) \
? "NO\0" \
: "NO\0UA\0UG\0CC\0FG\0" + 3 * n \
? NGX_HTTP_VHOST_TRAFFIC_STATUS_UPSTREAMS \
: NGX_HTTP_VHOST_TRAFFIC_STATUS_UPSTREAMS + 3 * n \
)

#define ngx_vhost_traffic_status_max_integer (NGX_ATOMIC_T_LEN < 12) \
Expand Down

0 comments on commit d6b04f9

Please sign in to comment.