mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-28 21:59:02 +08:00
Merge pull request #425 from mpromonet/master
make compile with g++ (fix invalid cast from ‘void*’)
This commit is contained in:
commit
30d29fb77f
@ -4930,7 +4930,7 @@ void mg_copy_listeners(struct mg_server *s, struct mg_server *to) {
|
||||
struct ns_connection *c;
|
||||
for (c = ns_next(&s->ns_mgr, NULL); c != NULL; c = ns_next(&s->ns_mgr, c)) {
|
||||
struct ns_connection *tmp;
|
||||
if ((c->flags & NSF_LISTENING) && (tmp = malloc(sizeof(*tmp))) != NULL) {
|
||||
if ((c->flags & NSF_LISTENING) && (tmp = (ns_connection *)malloc(sizeof(*tmp))) != NULL) {
|
||||
memcpy(tmp, c, sizeof(*tmp));
|
||||
tmp->mgr = &to->ns_mgr;
|
||||
ns_add_conn(tmp->mgr, tmp);
|
||||
|
Loading…
Reference in New Issue
Block a user