Avoid NULL deference which causes DEBUG1 to crash, not to print useful

information.

Obtained from:	OpenBSD
This commit is contained in:
Xin LI 2009-03-28 06:40:48 +00:00
parent 89bc741f77
commit 4524c90576

View File

@ -282,7 +282,7 @@ newbuf(HTAB *hashp, u_int32_t addr, BUFHEAD *prev_bp)
*/
#ifdef DEBUG1
(void)fprintf(stderr, "NEWBUF2: %d->ovfl was %d is now %d\n",
prev_bp->addr, (prev_bp->ovfl ? bp->ovfl->addr : 0),
prev_bp->addr, (prev_bp->ovfl ? prev_bp->ovfl->addr : 0),
(bp ? bp->addr : 0));
#endif
prev_bp->ovfl = bp;