From 694d3b25edcce3b25364d1d073f338dd6ac0b4d9 Mon Sep 17 00:00:00 2001 From: Charles Longeau Date: Sun, 15 Feb 2009 17:13:06 +0000 Subject: do not check malloc return value against NULL, as M_WAITOK is used ok krw@ miod@ (some months ago) --- sys/dev/wsfont/wsfont.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/wsfont/wsfont.c b/sys/dev/wsfont/wsfont.c index 9543a043df7..3dee94a58d3 100644 --- a/sys/dev/wsfont/wsfont.c +++ b/sys/dev/wsfont/wsfont.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsfont.c,v 1.23 2008/06/26 05:42:19 ray Exp $ */ +/* $OpenBSD: wsfont.c,v 1.24 2009/02/15 17:13:05 chl Exp $ */ /* $NetBSD: wsfont.c,v 1.17 2001/02/07 13:59:24 ad Exp $ */ /*- @@ -297,8 +297,6 @@ wsfont_rotate_internal(struct wsdisplay_font *font) /* Duplicate the existing font... */ newfont = malloc(sizeof *font, M_DEVBUF, M_WAITOK); - if (newfont == NULL) - return (NULL); bcopy(font, newfont, sizeof *font); newfont->cookie = NULL; @@ -307,10 +305,6 @@ wsfont_rotate_internal(struct wsdisplay_font *font) newstride = (font->fontheight + 7) / 8; newbits = malloc(newstride * font->fontwidth * font->numchars, M_DEVBUF, M_WAITOK | M_ZERO); - if (newbits == NULL) { - free(newfont, M_DEVBUF); - return (NULL); - } /* Rotate the font a bit at a time. */ for (n = 0; n < font->numchars; n++) { -- cgit v1.2.3