diff --git a/lib/util/alloc.c b/lib/util/alloc.c index c6f94ba66..3ecbecde3 100644 --- a/lib/util/alloc.c +++ b/lib/util/alloc.c @@ -170,20 +170,20 @@ sudo_ereallocarray(void *ptr, size_t nmemb, size_t size) } /* - * sudo_ersudo_ecalloc() realloc(3)s nmemb * msize bytes and exits with an error + * sudo_erecalloc() realloc(3)s nmemb * msize bytes and exits with an error * if overflow would occur or if the system malloc(3)/realloc(3) fails. * On success, the new space is zero-filled. You can call sudo_erealloc() * with a NULL pointer even if the system realloc(3) does not support this. */ void * -ersudo_ecalloc(void *ptr, size_t onmemb, size_t nmemb, size_t msize) +sudo_erecalloc(void *ptr, size_t onmemb, size_t nmemb, size_t msize) { size_t size; if (nmemb == 0 || msize == 0) sudo_fatalx_nodebug(_("internal error, tried allocate zero bytes")); if (nmemb > SIZE_MAX / msize) - sudo_fatalx_nodebug(_("internal error, %s overflow"), "ersudo_ecalloc"); + sudo_fatalx_nodebug(_("internal error, %s overflow"), "sudo_erecalloc"); size = nmemb * msize; ptr = ptr ? realloc(ptr, size) : malloc(size); diff --git a/lib/util/event_select.c b/lib/util/event_select.c index d1eab7ef1..0955860f0 100644 --- a/lib/util/event_select.c +++ b/lib/util/event_select.c @@ -92,10 +92,10 @@ sudo_ev_add_impl(struct sudo_event_base *base, struct sudo_event *ev) if (ev->fd > base->maxfd) { const int o = (base->maxfd + 1) / NFDBITS; const int n = howmany(ev->fd + 1, NFDBITS); - base->readfds_in = ersudo_ecalloc(base->readfds_in, o, n, sizeof(fd_mask)); - base->writefds_in = ersudo_ecalloc(base->writefds_in, o, n, sizeof(fd_mask)); - base->readfds_out = ersudo_ecalloc(base->readfds_out, o, n, sizeof(fd_mask)); - base->writefds_out = ersudo_ecalloc(base->writefds_out, o, n, sizeof(fd_mask)); + base->readfds_in = sudo_erecalloc(base->readfds_in, o, n, sizeof(fd_mask)); + base->writefds_in = sudo_erecalloc(base->writefds_in, o, n, sizeof(fd_mask)); + base->readfds_out = sudo_erecalloc(base->readfds_out, o, n, sizeof(fd_mask)); + base->writefds_out = sudo_erecalloc(base->writefds_out, o, n, sizeof(fd_mask)); base->maxfd = (n * NFDBITS) - 1; }