Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed compile error in gcc version 4.1.2 #1

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions ngx_http_kafka_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ void ngx_http_kafka_main_conf_broker_add(ngx_http_kafka_main_conf_t *cf,
}
cf->brokers[n].len = broker->len;

ngx_copy(cf->brokers[n].data, broker->data, broker->len);
//ngx_copy(cf->brokers[n].data, broker->data, broker->len);
memcpy(cf->brokers[n].data, broker->data, broker->len);
cf->brokers[n].data[broker->len] = '\0';
cf->nbrokers++;
}
Expand Down Expand Up @@ -281,7 +282,7 @@ static void ngx_http_kafka_post_callback_handler(ngx_http_request_t *r)
ngx_chain_t out;
ngx_chain_t *cl, *in;
ngx_http_request_body_t *body;
ngx_http_kafka_main_conf_t *main_conf;
ngx_http_kafka_main_conf_t *main_conf = NULL;
ngx_http_kafka_loc_conf_t *local_conf;

/* get body */
Expand Down