diff --git a/mongoose.c b/mongoose.c index e55a5562f7ad36f7018808544a521d2371d3f243..cd1e5c72036535e752e468dbe778bbd2db16f874 100644 --- a/mongoose.c +++ b/mongoose.c @@ -4930,7 +4930,8 @@ 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 = (ns_connection *)malloc(sizeof(*tmp))) != NULL) { + if ((c->flags & NSF_LISTENING) && + (tmp = (struct ns_connection *) malloc(sizeof(*tmp))) != NULL) { memcpy(tmp, c, sizeof(*tmp)); tmp->mgr = &to->ns_mgr; ns_add_conn(tmp->mgr, tmp);