Date: Thu, 14 Jan 2016 15:49:24 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r293977 - head/usr.sbin/boot0cfg Message-ID: <201601141549.u0EFnOog050090@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Thu Jan 14 15:49:24 2016 New Revision: 293977 URL: https://svnweb.freebsd.org/changeset/base/293977 Log: Adjust previous fix to conform to the existing style in this file. Modified: head/usr.sbin/boot0cfg/boot0cfg.c Modified: head/usr.sbin/boot0cfg/boot0cfg.c ============================================================================== --- head/usr.sbin/boot0cfg/boot0cfg.c Thu Jan 14 15:49:15 2016 (r293976) +++ head/usr.sbin/boot0cfg/boot0cfg.c Thu Jan 14 15:49:24 2016 (r293977) @@ -336,8 +336,7 @@ read_mbr(const char *disk, u_int8_t **mb close(fd); return (mbr_size); } - *mbr = malloc(sizeof(buf)); - if (*mbr == NULL) + if ((*mbr = malloc(sizeof(buf))) == NULL) errx(1, "%s: unable to allocate MBR buffer", disk); memcpy(*mbr, buf, sizeof(buf)); close(fd);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601141549.u0EFnOog050090>