summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2016-01-14 15:49:24 +0000
committerjhb <jhb@FreeBSD.org>2016-01-14 15:49:24 +0000
commitb083553eeeae5afa5f0160fd804d19b02dbe4889 (patch)
tree843c15f72c9c90e168bf8c0a6f96f4fb415901e0
parente438997c5ad54ff6759ae8e26136da3bc3163fe6 (diff)
downloadFreeBSD-src-b083553eeeae5afa5f0160fd804d19b02dbe4889.zip
FreeBSD-src-b083553eeeae5afa5f0160fd804d19b02dbe4889.tar.gz
Adjust previous fix to conform to the existing style in this file.
-rw-r--r--usr.sbin/boot0cfg/boot0cfg.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/usr.sbin/boot0cfg/boot0cfg.c b/usr.sbin/boot0cfg/boot0cfg.c
index f2cbf67..c2cb91d 100644
--- a/usr.sbin/boot0cfg/boot0cfg.c
+++ b/usr.sbin/boot0cfg/boot0cfg.c
@@ -336,8 +336,7 @@ read_mbr(const char *disk, u_int8_t **mbr, int check_version)
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);
OpenPOWER on IntegriCloud