use better MX hash function
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Tue, 1 Feb 1994 09:34:00 +0000 (01:34 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Tue, 1 Feb 1994 09:34:00 +0000 (01:34 -0800)
SCCS-vsn: usr.sbin/sendmail/src/domain.c 8.12

usr/src/usr.sbin/sendmail/src/domain.c

index afdf2de..6612a4d 100644 (file)
@@ -10,9 +10,9 @@
 
 #ifndef lint
 #ifdef NAMED_BIND
 
 #ifndef lint
 #ifdef NAMED_BIND
-static char sccsid[] = "@(#)domain.c   8.11 (Berkeley) %G% (with name server)";
+static char sccsid[] = "@(#)domain.c   8.12 (Berkeley) %G% (with name server)";
 #else
 #else
-static char sccsid[] = "@(#)domain.c   8.11 (Berkeley) %G% (without name server)";
+static char sccsid[] = "@(#)domain.c   8.12 (Berkeley) %G% (without name server)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
@@ -358,7 +358,7 @@ mxrand(host)
 
                if (isascii(c) && isupper(c))
                        c = tolower(c);
 
                if (isascii(c) && isupper(c))
                        c = tolower(c);
-               hfunc = ((hfunc << 1) + c) % 2003;
+               hfunc = ((hfunc << 1) ^ c) % 2003;
        }
 
        hfunc &= 0xff;
        }
 
        hfunc &= 0xff;