diff options
author | 2014-06-09 13:13:48 +0000 | |
---|---|---|
committer | 2014-06-09 13:13:48 +0000 | |
commit | 210008b3130591ff79d2d5024ffeaba6feea47ff (patch) | |
tree | 70f086223637682b9fabcc0405785eb6ab04ab26 /usr.sbin/installboot/i386_softraid.c | |
parent | Split the 88100 floating point support code in two files, one for the precise (diff) | |
download | wireguard-openbsd-210008b3130591ff79d2d5024ffeaba6feea47ff.tar.xz wireguard-openbsd-210008b3130591ff79d2d5024ffeaba6feea47ff.zip |
Use calloc() instead of malloc()/memset().
From Benjamin Baier.
Diffstat (limited to 'usr.sbin/installboot/i386_softraid.c')
-rw-r--r-- | usr.sbin/installboot/i386_softraid.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/installboot/i386_softraid.c b/usr.sbin/installboot/i386_softraid.c index c2409744fda..a5a05807387 100644 --- a/usr.sbin/installboot/i386_softraid.c +++ b/usr.sbin/installboot/i386_softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i386_softraid.c,v 1.1 2014/01/19 02:58:50 jsing Exp $ */ +/* $OpenBSD: i386_softraid.c,v 1.2 2014/06/09 13:13:48 jsing Exp $ */ /* * Copyright (c) 2012 Joel Sing <jsing@openbsd.org> * @@ -129,11 +129,10 @@ sr_install_bootldr(int devfd, char *dev) inodeblk = nblocks - 1; bootsize = nblocks * SR_FS_BLOCKSIZE; - p = malloc(bootsize); + p = calloc(1, bootsize); if (p == NULL) err(1, NULL); - memset(p, 0, bootsize); fd = open(stage2, O_RDONLY, 0); if (fd == -1) err(1, NULL); |