Use a consistent size as the parameter for the *alloc family.
int fd;
evports_evlist_max = global.tune.maxpollevents;
- evports_evlist = calloc(evports_evlist_max, sizeof (port_event_t));
+ evports_evlist = calloc(evports_evlist_max, sizeof(*evports_evlist));
if (evports_evlist == NULL) {
goto fail_alloc;
}
if (hdr_num) {
/* alloc and copy the headers in the httpclient struct */
- result = calloc((hdr_num + 1), sizeof(*hdrs));
+ result = calloc((hdr_num + 1), sizeof(*result));
if (!result)
goto skip_headers;
memcpy(result, hdrs, sizeof(struct http_hdr) * (hdr_num + 1));