Skip to content

Commit 9c1ac62

Browse files
wpjunioru5surf
authored andcommitted
Apply suggestions from code review[1]
1 parent e5869de commit 9c1ac62

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/ngx_http_vhost_traffic_status_display_json.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@ ngx_http_vhost_traffic_status_display_set_server_node(
111111
vtsn->stat_out_bytes);
112112

113113
if (ctx->measure_status_codes != NULL && vtsn->stat_status_code_counter != NULL) {
114-
ngx_uint_t *status_code = NULL;
115-
116114
buf = ngx_sprintf(buf, NGX_HTTP_VHOST_TRAFFIC_STATUS_JSON_FMT_SERVER_STATUS_CODE_START);
117115

118116
ngx_uint_t *status_codes = (ngx_uint_t *) ctx->measure_status_codes->elts;
@@ -121,12 +119,11 @@ ngx_http_vhost_traffic_status_display_set_server_node(
121119
if (vtsn->stat_status_code_counter[i] == 0 && ctx->measure_all_status_codes) {
122120
continue;
123121
}
124-
status_code = &status_codes[i];
125122
if (inserted > 0) {
126123
buf = ngx_sprintf(buf, NGX_HTTP_VHOST_TRAFFIC_STATUS_JSON_FMT_SERVER_STATUS_SEPARATOR);
127124
}
128125
buf = ngx_sprintf(buf, NGX_HTTP_VHOST_TRAFFIC_STATUS_JSON_FMT_SERVER_STATUS_CODE,
129-
*status_code, vtsn->stat_status_code_counter[i]);
126+
status_codes[i], vtsn->stat_status_code_counter[i]);
130127
inserted++;
131128
}
132129

0 commit comments

Comments
 (0)