version 1.34, 2015/01/16 06:40:11 |
version 1.35, 2015/08/20 22:32:41 |
|
|
xdr_destroy(&xdr); |
xdr_destroy(&xdr); |
|
|
maxfd = MAXIMUM(sock[0], sock[1]) + 1; |
maxfd = MAXIMUM(sock[0], sock[1]) + 1; |
fds = (fd_set *)calloc(howmany(maxfd, NFDBITS), sizeof(fd_mask)); |
fds = calloc(howmany(maxfd, NFDBITS), sizeof(fd_mask)); |
if (fds == NULL) |
if (fds == NULL) |
err(1, NULL); |
err(1, NULL); |
|
|
|
|
for (i = 0, count = 0; i < nentries; i++) |
for (i = 0, count = 0; i < nentries; i++) |
count += hostinfo[i].count; |
count += hostinfo[i].count; |
|
|
new_hostinfo = (struct host_info *)calloc(sizeof(*entry), count); |
new_hostinfo = calloc(sizeof(*entry), count); |
if (new_hostinfo == NULL) |
if (new_hostinfo == NULL) |
err(1, NULL); |
err(1, NULL); |
for (i = 0, entry = new_hostinfo; i < nentries; i++) { |
for (i = 0, entry = new_hostinfo; i < nentries; i++) { |