svn commit: r196454 - head/sys/kern
Author: rpaulo Date: Sun Aug 23 09:55:06 2009 New Revision: 196454 URL: http://svn.freebsd.org/changeset/base/196454 Log: Constify prime numbers. Modified: head/sys/kern/kern_subr.c Modified: head/sys/kern/kern_subr.c == --- head/sys/kern/kern_subr.c Sun Aug 23 08:49:32 2009(r196453) +++ head/sys/kern/kern_subr.c Sun Aug 23 09:55:06 2009(r196454) @@ -419,9 +419,9 @@ hashdestroy(void *vhashtbl, struct mallo free(hashtbl, type); } -static int primes[] = { 1, 13, 31, 61, 127, 251, 509, 761, 1021, 1531, 2039, - 2557, 3067, 3583, 4093, 4603, 5119, 5623, 6143, 6653, - 7159, 7673, 8191, 12281, 16381, 24571, 32749 }; +static const int primes[] = { 1, 13, 31, 61, 127, 251, 509, 761, 1021, 1531, + 2039, 2557, 3067, 3583, 4093, 4603, 5119, 5623, 6143, + 6653, 7159, 7673, 8191, 12281, 16381, 24571, 32749 }; #define NPRIMES (sizeof(primes) / sizeof(primes[0])) /* ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r196454 - head/sys/kern
On Sun, Aug 23, 2009 at 09:55:06AM +, Rui Paulo wrote: > Author: rpaulo > Date: Sun Aug 23 09:55:06 2009 > New Revision: 196454 > URL: http://svn.freebsd.org/changeset/base/196454 > > Log: > Constify prime numbers. > > Modified: > head/sys/kern/kern_subr.c > > Modified: head/sys/kern/kern_subr.c > == > --- head/sys/kern/kern_subr.c Sun Aug 23 08:49:32 2009(r196453) > +++ head/sys/kern/kern_subr.c Sun Aug 23 09:55:06 2009(r196454) > @@ -419,9 +419,9 @@ hashdestroy(void *vhashtbl, struct mallo > free(hashtbl, type); > } > > -static int primes[] = { 1, 13, 31, 61, 127, 251, 509, 761, 1021, 1531, 2039, > - 2557, 3067, 3583, 4093, 4603, 5119, 5623, 6143, 6653, > - 7159, 7673, 8191, 12281, 16381, 24571, 32749 }; > +static const int primes[] = { 1, 13, 31, 61, 127, 251, 509, 761, 1021, 1531, > + 2039, 2557, 3067, 3583, 4093, 4603, 5119, 5623, 6143, > + 6653, 7159, 7673, 8191, 12281, 16381, 24571, 32749 }; > #define NPRIMES (sizeof(primes) / sizeof(primes[0])) > > /* btw... this is currently unused as we dont use the "prime hash". maybe we can remove this completely? ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r196454 - head/sys/kern
On 26 Aug 2009, at 20:01, Roman Divacky wrote: On Sun, Aug 23, 2009 at 09:55:06AM +, Rui Paulo wrote: Author: rpaulo Date: Sun Aug 23 09:55:06 2009 New Revision: 196454 URL: http://svn.freebsd.org/changeset/base/196454 Log: Constify prime numbers. Modified: head/sys/kern/kern_subr.c Modified: head/sys/kern/kern_subr.c = = = = = = = = = = --- head/sys/kern/kern_subr.c Sun Aug 23 08:49:32 2009(r196453) +++ head/sys/kern/kern_subr.c Sun Aug 23 09:55:06 2009(r196454) @@ -419,9 +419,9 @@ hashdestroy(void *vhashtbl, struct mallo free(hashtbl, type); } -static int primes[] = { 1, 13, 31, 61, 127, 251, 509, 761, 1021, 1531, 2039, - 2557, 3067, 3583, 4093, 4603, 5119, 5623, 6143, 6653, - 7159, 7673, 8191, 12281, 16381, 24571, 32749 }; +static const int primes[] = { 1, 13, 31, 61, 127, 251, 509, 761, 1021, 1531, + 2039, 2557, 3067, 3583, 4093, 4603, 5119, 5623, 6143, + 6653, 7159, 7673, 8191, 12281, 16381, 24571, 32749 }; #define NPRIMES (sizeof(primes) / sizeof(primes[0])) /* btw... this is currently unused as we dont use the "prime hash". maybe we can remove this completely? I don't mind if we mark it as deprecated. -- Rui Paulo ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"