diff options
author | 2015-10-08 12:54:30 +0000 | |
---|---|---|
committer | 2015-10-08 12:54:30 +0000 | |
commit | bbb248d5d9f75c6232469c586fd29fa96dae4c57 (patch) | |
tree | 79063c5f1ac129d6b7fc0298cf1ba4aaf085b194 | |
parent | if the mbuf has a valid flowid, use it instead of using siphash24 (diff) | |
download | wireguard-openbsd-bbb248d5d9f75c6232469c586fd29fa96dae4c57.tar.xz wireguard-openbsd-bbb248d5d9f75c6232469c586fd29fa96dae4c57.zip |
Simpify some code by noting that DOSBBSECTOR is 0, so "if (n >
n+DOSBBSSECTOR) ..." is pointless, as is "n = n + DOSBBSECTOR;".
-rw-r--r-- | sys/arch/amd64/stand/libsa/softraid.c | 9 | ||||
-rw-r--r-- | sys/arch/i386/stand/libsa/softraid.c | 9 |
2 files changed, 6 insertions, 12 deletions
diff --git a/sys/arch/amd64/stand/libsa/softraid.c b/sys/arch/amd64/stand/libsa/softraid.c index bf46d86b85e..336865ae885 100644 --- a/sys/arch/amd64/stand/libsa/softraid.c +++ b/sys/arch/amd64/stand/libsa/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.13 2015/10/01 20:28:12 krw Exp $ */ +/* $OpenBSD: softraid.c,v 1.14 2015/10/08 12:54:30 krw Exp $ */ /* * Copyright (c) 2012 Joel Sing <jsing@openbsd.org> @@ -413,11 +413,8 @@ sr_getdisklabel(struct sr_boot_volume *bv, struct disklabel *label) dp = &mbr.dmbr_parts[i]; if (!dp->dp_size) continue; - if (dp->dp_typ == DOSPTYP_OPENBSD) { - if (dp->dp_start > (dp->dp_start + DOSBBSECTOR)) - continue; - start = dp->dp_start + DOSBBSECTOR; - } + if (dp->dp_typ == DOSPTYP_OPENBSD) + start = dp->dp_start; } } diff --git a/sys/arch/i386/stand/libsa/softraid.c b/sys/arch/i386/stand/libsa/softraid.c index bf46d86b85e..336865ae885 100644 --- a/sys/arch/i386/stand/libsa/softraid.c +++ b/sys/arch/i386/stand/libsa/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.13 2015/10/01 20:28:12 krw Exp $ */ +/* $OpenBSD: softraid.c,v 1.14 2015/10/08 12:54:30 krw Exp $ */ /* * Copyright (c) 2012 Joel Sing <jsing@openbsd.org> @@ -413,11 +413,8 @@ sr_getdisklabel(struct sr_boot_volume *bv, struct disklabel *label) dp = &mbr.dmbr_parts[i]; if (!dp->dp_size) continue; - if (dp->dp_typ == DOSPTYP_OPENBSD) { - if (dp->dp_start > (dp->dp_start + DOSBBSECTOR)) - continue; - start = dp->dp_start + DOSBBSECTOR; - } + if (dp->dp_typ == DOSPTYP_OPENBSD) + start = dp->dp_start; } } |