From: Brent Cook <[email protected]>
Yeah yeah, a pointer is a pointer (except when it isn't :). I think this
looks nicer, since idx2peer is really the thing we're allocating to.
ok?
---
src/usr.sbin/ntpd/ntp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/usr.sbin/ntpd/ntp.c b/src/usr.sbin/ntpd/ntp.c
index 8c46bfc..41162bb 100644
--- a/src/usr.sbin/ntpd/ntp.c
+++ b/src/usr.sbin/ntpd/ntp.c
@@ -200,7 +200,7 @@ ntp_main(int pipe_prnt[2], int fd_ctl, struct ntpd_conf
*nconf,
while (ntp_quit == 0) {
if (peer_cnt > idx2peer_elms) {
if ((newp = reallocarray(idx2peer, peer_cnt,
- sizeof(void *))) == NULL) {
+ sizeof(struct ntp_peer *))) == NULL) {
/* panic for now */
log_warn("could not resize idx2peer from %u -> "
"%u entries", idx2peer_elms, peer_cnt);
--
1.9.1