svn commit: r293977 - head/usr.sbin/boot0cfg
John Baldwin
jhb at FreeBSD.org
Thu Jan 14 15:49:26 UTC 2016
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);
More information about the svn-src-all
mailing list