Correct a few diagnostics

This commit is contained in:
Brian Somers 1999-10-16 13:28:04 +00:00
parent 5144916906
commit 53dc037c22

View File

@ -417,7 +417,7 @@ iface_ChangeFlags(struct iface *iface, int flags, int how)
s = ID0socket(AF_INET, SOCK_DGRAM, 0); s = ID0socket(AF_INET, SOCK_DGRAM, 0);
if (s < 0) { if (s < 0) {
log_Printf(LogERROR, "iface_ClearFlags: socket: %s\n", strerror(errno)); log_Printf(LogERROR, "iface_ChangeFlags: socket: %s\n", strerror(errno));
return 0; return 0;
} }
@ -425,7 +425,7 @@ iface_ChangeFlags(struct iface *iface, int flags, int how)
strncpy(ifrq.ifr_name, iface->name, sizeof ifrq.ifr_name - 1); strncpy(ifrq.ifr_name, iface->name, sizeof ifrq.ifr_name - 1);
ifrq.ifr_name[sizeof ifrq.ifr_name - 1] = '\0'; ifrq.ifr_name[sizeof ifrq.ifr_name - 1] = '\0';
if (ID0ioctl(s, SIOCGIFFLAGS, &ifrq) < 0) { if (ID0ioctl(s, SIOCGIFFLAGS, &ifrq) < 0) {
log_Printf(LogERROR, "iface_ClearFlags: ioctl(SIOCGIFFLAGS): %s\n", log_Printf(LogERROR, "iface_ChangeFlags: ioctl(SIOCGIFFLAGS): %s\n",
strerror(errno)); strerror(errno));
close(s); close(s);
return 0; return 0;
@ -437,7 +437,7 @@ iface_ChangeFlags(struct iface *iface, int flags, int how)
ifrq.ifr_flags &= ~flags; ifrq.ifr_flags &= ~flags;
if (ID0ioctl(s, SIOCSIFFLAGS, &ifrq) < 0) { if (ID0ioctl(s, SIOCSIFFLAGS, &ifrq) < 0) {
log_Printf(LogERROR, "iface_ClearFlags: ioctl(SIOCSIFFLAGS): %s\n", log_Printf(LogERROR, "iface_ChangeFlags: ioctl(SIOCSIFFLAGS): %s\n",
strerror(errno)); strerror(errno));
close(s); close(s);
return 0; return 0;