]> granicus.if.org Git - sudo/commitdiff
took out debugging info
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 7 Apr 1995 19:08:17 +0000 (19:08 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 7 Apr 1995 19:08:17 +0000 (19:08 +0000)
sudo.c

diff --git a/sudo.c b/sudo.c
index f1fa17902275f71bdca0e9aa4814d64c980c6317..219cd49c5c23a67bc94b00287426f23d372cb595 100644 (file)
--- a/sudo.c
+++ b/sudo.c
@@ -638,8 +638,8 @@ static void load_interfaces()
            if (errno == EADDRNOTAVAIL || errno == EAFNOSUPPORT)
                continue;
 
-           /* XXX - do better */
-           perror("ioctl: SIOCGIFADDR");
+           (void) fprintf(stderr, "%s: Error, ioctl: SIOCGIFADDR", Argv[0]);
+           perror("");
            exit(1);
        }
        sin = (struct sockaddr_in *)&ifreq.ifr_addr;
@@ -681,8 +681,6 @@ static void load_interfaces()
        ++j;
     }
 
-    /* XXX - debugging */
-    fprintf(stderr, "there was/were %d bogus interface(s)\n", i-j);
     /* if there were bogus entries, realloc the array */
     if (i != j) {
        interfaces = (struct interface *) realloc(interfaces,
@@ -693,17 +691,6 @@ static void load_interfaces()
            exit(1);
        }
     }
-
-    /* XXX - debugging */
-    for (i = 0; i < j; i++) {
-       (void) memcpy(&(sin->sin_addr), &interfaces[i].addr,
-           sizeof(struct in_addr));
-       (void) fprintf(stderr, "%s ", inet_ntoa(sin->sin_addr));
-
-       (void) memcpy(&(sin->sin_addr), &interfaces[i].netmask,
-           sizeof(struct in_addr));
-       (void) fprintf(stderr, "%s\n", inet_ntoa(sin->sin_addr));
-    }
 }