diff options
author | 2013-09-11 01:42:21 +0000 | |
---|---|---|
committer | 2013-09-11 01:42:21 +0000 | |
commit | 1ea18245bc442d76af3b2886349342b827b3dfb8 (patch) | |
tree | 9215113105654aefe6b0689edc4218ecd15d07b7 | |
parent | fix typos for additional functions (diff) | |
download | wireguard-openbsd-1ea18245bc442d76af3b2886349342b827b3dfb8.tar.xz wireguard-openbsd-1ea18245bc442d76af3b2886349342b827b3dfb8.zip |
Use u_int64_t instead of daddr_t for the local variables in the
DL_SET* macros. These are sector values, not 512-byte block values.
ok deraadt@
-rw-r--r-- | sys/sys/disklabel.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/sys/disklabel.h b/sys/sys/disklabel.h index ab375153934..123d472ce8b 100644 --- a/sys/sys/disklabel.h +++ b/sys/sys/disklabel.h @@ -1,4 +1,4 @@ -/* $OpenBSD: disklabel.h,v 1.55 2013/06/11 16:42:18 deraadt Exp $ */ +/* $OpenBSD: disklabel.h,v 1.56 2013/09/11 01:42:21 krw Exp $ */ /* $NetBSD: disklabel.h,v 1.41 1996/05/10 23:07:37 mark Exp $ */ /* @@ -172,13 +172,13 @@ struct __partitionv0 { /* the partition table */ #define DL_GETPSIZE(p) (((u_int64_t)(p)->p_sizeh << 32) + (p)->p_size) #define DL_SETPSIZE(p, n) do { \ - daddr_t x = (n); \ + u_int64_t x = (n); \ (p)->p_sizeh = x >> 32; \ (p)->p_size = x; \ } while (0) #define DL_GETPOFFSET(p) (((u_int64_t)(p)->p_offseth << 32) + (p)->p_offset) #define DL_SETPOFFSET(p, n) do { \ - daddr_t x = (n); \ + u_int64_t x = (n); \ (p)->p_offseth = x >> 32; \ (p)->p_offset = x; \ } while (0) @@ -186,21 +186,21 @@ struct __partitionv0 { /* the partition table */ #define DL_GETDSIZE(d) (((u_int64_t)(d)->d_secperunith << 32) + \ (d)->d_secperunit) #define DL_SETDSIZE(d, n) do { \ - daddr_t x = (n); \ + u_int64_t x = (n); \ (d)->d_secperunith = x >> 32; \ (d)->d_secperunit = x; \ } while (0) #define DL_GETBSTART(d) (((u_int64_t)(d)->d_bstarth << 32) + \ (d)->d_bstart) #define DL_SETBSTART(d, n) do { \ - daddr_t x = (n); \ + u_int64_t x = (n); \ (d)->d_bstarth = x >> 32; \ (d)->d_bstart = x; \ } while (0) #define DL_GETBEND(d) (((u_int64_t)(d)->d_bendh << 32) + \ (d)->d_bend) #define DL_SETBEND(d, n) do { \ - daddr_t x = (n); \ + u_int64_t x = (n); \ (d)->d_bendh = x >> 32; \ (d)->d_bend = x; \ } while (0) |