From owner-svn-src-head@FreeBSD.ORG Wed Aug 26 19:04:08 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0182E106568E; Wed, 26 Aug 2009 19:04:08 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (77-93-215-190.static.masterinter.net [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id AB0CA8FC20; Wed, 26 Aug 2009 19:04:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 081889CB08A; Wed, 26 Aug 2009 21:01:22 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id B9JBkDMWpU30; Wed, 26 Aug 2009 21:01:19 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id D0FB19CB0EC; Wed, 26 Aug 2009 21:01:19 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.3/8.14.3/Submit) id n7QJ1JW8044576; Wed, 26 Aug 2009 21:01:19 +0200 (CEST) (envelope-from rdivacky) Date: Wed, 26 Aug 2009 21:01:19 +0200 From: Roman Divacky To: Rui Paulo Message-ID: <20090826190119.GB39075@freebsd.org> References: <200908230955.n7N9t6Go053499@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200908230955.n7N9t6Go053499@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r196454 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Aug 2009 19:04:08 -0000 On Sun, Aug 23, 2009 at 09:55:06AM +0000, 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?