99 *
1010 *
1111 * IDENTIFICATION
12- * $PostgreSQL: pgsql/src/backend/utils/hash/dynahash.c,v 1.54 2004/09/28 20:46:34 tgl Exp $
12+ * $PostgreSQL: pgsql/src/backend/utils/hash/dynahash.c,v 1.55 2004/10/22 07:21:06 neilc Exp $
1313 *
1414 *-------------------------------------------------------------------------
1515 */
@@ -66,7 +66,7 @@ static HASHSEGMENT seg_alloc(HTAB *hashp);
6666static bool element_alloc (HTAB * hashp , int nelem );
6767static bool dir_realloc (HTAB * hashp );
6868static bool expand_table (HTAB * hashp );
69- static bool hdefault (HTAB * hashp );
69+ static void hdefault (HTAB * hashp );
7070static bool init_htab (HTAB * hashp , long nelem );
7171static void hash_corrupted (HTAB * hashp );
7272
@@ -178,8 +178,7 @@ hash_create(const char *tabname, long nelem, HASHCTL *info, int flags)
178178 return NULL ;
179179 }
180180
181- if (!hdefault (hashp ))
182- return NULL ;
181+ hdefault (hashp );
183182
184183 hctl = hashp -> hctl ;
185184#ifdef HASH_STATISTICS
@@ -254,7 +253,7 @@ hash_create(const char *tabname, long nelem, HASHCTL *info, int flags)
254253/*
255254 * Set default HASHHDR parameters.
256255 */
257- static bool
256+ static void
258257hdefault (HTAB * hashp )
259258{
260259 HASHHDR * hctl = hashp -> hctl ;
@@ -268,8 +267,6 @@ hdefault(HTAB *hashp)
268267 hctl -> nentries = 0 ;
269268 hctl -> nsegs = 0 ;
270269
271- /* I added these MS. */
272-
273270 /* rather pointless defaults for key & entry size */
274271 hctl -> keysize = sizeof (char * );
275272 hctl -> entrysize = 2 * sizeof (char * );
@@ -279,8 +276,6 @@ hdefault(HTAB *hashp)
279276
280277 /* garbage collection for HASH_REMOVE */
281278 hctl -> freeList = NULL ;
282-
283- return true;
284279}
285280
286281
0 commit comments