NI_WITHSCOPEID cleanup

Reviewed by:	gad
This commit is contained in:
ume 2005-05-13 16:43:28 +00:00
parent e33ba03345
commit 7ef908f6aa
2 changed files with 5 additions and 5 deletions

View File

@ -230,13 +230,13 @@ checkremote(struct printer *pp)
for (lr = local_res; lr; lr = lr->ai_next) {
h1[0] = '\0';
if (getnameinfo(lr->ai_addr, lr->ai_addrlen, h1, sizeof(h1),
NULL, 0, NI_NUMERICHOST | NI_WITHSCOPEID) != 0)
NULL, 0, NI_NUMERICHOST) != 0)
continue;
for (rr = remote_res; rr; rr = rr->ai_next) {
h2[0] = '\0';
if (getnameinfo(rr->ai_addr, rr->ai_addrlen,
h2, sizeof(h2), NULL, 0,
NI_NUMERICHOST | NI_WITHSCOPEID) != 0)
NI_NUMERICHOST) != 0)
continue;
if (strcmp(h1, h2) == 0)
ncommonaddrs++;

View File

@ -675,7 +675,7 @@ chkhost(struct sockaddr *f, int ch_opts)
if (error) {
errsav = error;
error = getnameinfo(f, f->sa_len, hostbuf, sizeof(hostbuf),
NULL, 0, NI_NUMERICHOST | NI_WITHSCOPEID);
NULL, 0, NI_NUMERICHOST);
if (error) {
asprintf(&syserr,
"can not determine hostname for remote host (%d,%d)",
@ -701,7 +701,7 @@ chkhost(struct sockaddr *f, int ch_opts)
/* Need address in stringform for comparison (no DNS lookup here) */
error = getnameinfo(f, f->sa_len, hostbuf, sizeof(hostbuf), NULL, 0,
NI_NUMERICHOST | NI_WITHSCOPEID);
NI_NUMERICHOST);
if (error) {
asprintf(&syserr, "Cannot print IP address (error %d)",
error);
@ -743,7 +743,7 @@ chkhost(struct sockaddr *f, int ch_opts)
good = 0;
for (r = res; good == 0 && r; r = r->ai_next) {
error = getnameinfo(r->ai_addr, r->ai_addrlen, ip, sizeof(ip),
NULL, 0, NI_NUMERICHOST | NI_WITHSCOPEID);
NULL, 0, NI_NUMERICHOST);
if (!error && !strcmp(from_ip, ip))
good = 1;
}