afs_server: delete code that has been ifdef'ed out for years
authorGarrett Wollman <wollman@csail.mit.edu>
Tue, 31 Jul 2012 02:05:04 +0000 (22:05 -0400)
committerDerrick Brashear <shadow@dementix.org>
Tue, 31 Jul 2012 12:38:10 +0000 (05:38 -0700)
The comments in afs_SetServerPrefs() said "clean up, delete this".
The oldest one is a decade old.  Removing these #ifdefs will make
following the rest of the spaghetti #ifdefs a bit easier.

Change-Id: I187ccf2889a5244457218b109404be8b1cf1990e
Reviewed-on: http://gerrit.openafs.org/7911
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

src/afs/afs_server.c

index 9a34a14..76be5a1 100644 (file)
@@ -1194,16 +1194,6 @@ afs_SetServerPrefs(struct srvAddr *sa)
        }
        net = afsifinfo[i].ipaddr & netmask;
 
-#ifdef notdef
-       if (!s) {
-           if (!rx_IsLoopbackAddr(afsifinfo[i].ipaddr)) {      /* ignore loopback */
-               *cnt += 1;
-               if (*cnt > 16)
-                   return;
-               *addrp++ = afsifinfo[i].ipaddr;
-           }
-       } else
-#endif /* notdef */
         {
             /* XXXXXX Do the individual ip ranking below XXXXX */
             if ((sa->sa_ip & netmask) == net) {
@@ -1255,16 +1245,6 @@ afs_SetServerPrefs(struct srvAddr *sa)
                netmask = 0;
            }
            net = ipif->ipif_local_addr & netmask;
-#ifdef notdef
-           if (!s) {
-               if (!rx_IsLoopbackAddr(ipif->ipif_local_addr)) {        /* ignore loopback */
-                   *cnt += 1;
-                   if (*cnt > 16)
-                       return;
-                   *addrp++ = ipif->ipif_local_addr;
-               }
-           } else
-#endif /* notdef */
            {
                /* XXXXXX Do the individual ip ranking below XXXXX */
                if ((sa->sa_ip & netmask) == net) {
@@ -1300,20 +1280,6 @@ afs_SetServerPrefs(struct srvAddr *sa)
     struct sockaddr_in *sin;
 
     if (!sa) {
-#ifdef notdef                  /* clean up, remove this */
-       for (ifn = ifnet; ifn != NULL; ifn = ifn->if_next) {
-           for (ifad = ifn->if_addrlist; ifad != NULL; ifad = ifad->ifa_next) {
-               if ((IFADDR2SA(ifad)->sa_family == AF_INET)
-                   && !(ifn->if_flags & IFF_LOOPBACK)) {
-                   *cnt += 1;
-                   if (*cnt > 16)
-                       return;
-                   *addrp++ =
-                       ((struct sockaddr_in *)IFADDR2SA(ifad))->sin_addr.
-                       s_addr;
-               }
-       }}
-#endif                         /* notdef */
        return;
     }
     sa->sa_iprank = 0;