Module Name: src Committed By: maya Date: Sat Nov 4 08:33:28 UTC 2017
Modified Files: src/sys/dev/wsfont: wsfont.c Log Message: Don't test for failure of malloc(...,M_WAITOK), it cannot fail To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sys/dev/wsfont/wsfont.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/wsfont/wsfont.c diff -u src/sys/dev/wsfont/wsfont.c:1.61 src/sys/dev/wsfont/wsfont.c:1.62 --- src/sys/dev/wsfont/wsfont.c:1.61 Sun Nov 20 15:55:31 2016 +++ src/sys/dev/wsfont/wsfont.c Sat Nov 4 08:33:28 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: wsfont.c,v 1.61 2016/11/20 15:55:31 macallan Exp $ */ +/* $NetBSD: wsfont.c,v 1.62 2017/11/04 08:33:28 maya Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.61 2016/11/20 15:55:31 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.62 2017/11/04 08:33:28 maya Exp $"); #include "opt_wsfont.h" @@ -367,8 +367,6 @@ wsfont_rotate_cw_internal(struct wsdispl /* Duplicate the existing font... */ newfont = malloc(sizeof(*font), M_DEVBUF, M_WAITOK); - if (newfont == NULL) - return (NULL); *newfont = *font; @@ -382,10 +380,6 @@ wsfont_rotate_cw_internal(struct wsdispl 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++) { @@ -438,8 +432,6 @@ wsfont_rotate_ccw_internal(struct wsdisp /* Duplicate the existing font... */ newfont = malloc(sizeof(*font), M_DEVBUF, M_WAITOK); - if (newfont == NULL) - return (NULL); *newfont = *font; @@ -453,10 +445,6 @@ wsfont_rotate_ccw_internal(struct wsdisp 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++) {