Pacify gcc -Wuninitialized.

Use NULL instread of (struct fl *)0 - especically as this file doesn't
define struct fl.

XXX: there are more references in the comments to the struct fl
inherited from libsa/alloc.c.
This commit is contained in:
uwe 2006-01-27 01:03:10 +00:00
parent b85ba082e0
commit 0055f82067

View File

@ -1,4 +1,4 @@
/* $NetBSD: alloc.c,v 1.4 2006/01/25 18:28:28 christos Exp $ */ /* $NetBSD: alloc.c,v 1.5 2006/01/27 01:03:10 uwe Exp $ */
/*- /*-
* Copyright (c) 1997 The NetBSD Foundation, Inc. * Copyright (c) 1997 The NetBSD Foundation, Inc.
@ -152,9 +152,10 @@ alloc(size_t size)
f = f->list.le_next) f = f->list.le_next)
/* noop */ ; /* noop */ ;
bestf = f; bestf = f;
failed = (bestf == (struct fl *)0); failed = (bestf == NULL);
#else #else
/* scan freelist */ /* scan freelist */
bestf = NULL; /* XXXGCC: -Wuninitialized */
f = freelist.lh_first; f = freelist.lh_first;
while (f != NULL) { while (f != NULL) {
if ((size_t)f->size >= size) { if ((size_t)f->size >= size) {