summaryrefslogtreecommitdiffstats
path: root/sbin/fdisk
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2001-12-30 18:51:51 +0000
committeriedowse <iedowse@FreeBSD.org>2001-12-30 18:51:51 +0000
commit56c642c621e422931f63457c4d6b1da1762c85a0 (patch)
treeebf849d76b5ccbaa20fe1c65d7c6f13db90007b2 /sbin/fdisk
parent0d7e66ed2036a144d9aa5adb3b08e3578ca8584f (diff)
downloadFreeBSD-src-56c642c621e422931f63457c4d6b1da1762c85a0.zip
FreeBSD-src-56c642c621e422931f63457c4d6b1da1762c85a0.tar.gz
Oops, the arguments to a bcopy() were reversed, which broke zeroing
of unused partition entries and later detection of unused entries. Use memcpy to be consistent with the rest of the code, and fix a minor style nit. Submitted by: bde
Diffstat (limited to 'sbin/fdisk')
-rw-r--r--sbin/fdisk/fdisk.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sbin/fdisk/fdisk.c b/sbin/fdisk/fdisk.c
index 35d4ee4..eca068d 100644
--- a/sbin/fdisk/fdisk.c
+++ b/sbin/fdisk/fdisk.c
@@ -666,9 +666,8 @@ dos(partp)
int cy, sec;
u_int32_t end;
- if (partp->dp_typ == 0 && partp->dp_start == 0 &&
- partp->dp_size == 0) {
- bcopy(partp, &mtpart, sizeof(*partp));
+ if (partp->dp_typ == 0 && partp->dp_start == 0 && partp->dp_size == 0) {
+ memcpy(partp, &mtpart, sizeof(*partp));
return;
}
OpenPOWER on IntegriCloud