diff options
author | 2009-06-02 18:19:47 +0000 | |
---|---|---|
committer | 2009-06-02 18:19:47 +0000 | |
commit | c3e528970bd038dd75b7764bb02fb641aef4a80f (patch) | |
tree | 91bce65be1c12aa7b2215aab0fa05110103e1c65 | |
parent | The two "firmware" arrays only contained 16 bit values, but were being (diff) | |
download | wireguard-openbsd-c3e528970bd038dd75b7764bb02fb641aef4a80f.tar.xz wireguard-openbsd-c3e528970bd038dd75b7764bb02fb641aef4a80f.zip |
Some casts to please format strings a little bit later on
ok grange
-rw-r--r-- | sys/dev/onewire/onewirereg.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/onewire/onewirereg.h b/sys/dev/onewire/onewirereg.h index 6462e8db696..61d32699614 100644 --- a/sys/dev/onewire/onewirereg.h +++ b/sys/dev/onewire/onewirereg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: onewirereg.h,v 1.1 2006/03/04 16:27:03 grange Exp $ */ +/* $OpenBSD: onewirereg.h,v 1.2 2009/06/02 18:19:47 deraadt Exp $ */ /* * Copyright (c) 2006 Alexander Yurchenko <grange@openbsd.org> @@ -28,9 +28,9 @@ */ /* Family code */ -#define ONEWIRE_ROM_FAMILY(x) ((x) & 0xff) -#define ONEWIRE_ROM_FAMILY_TYPE(x) ((x) & 0x7f) -#define ONEWIRE_ROM_FAMILY_CUSTOM(x) (((x) >> 7) & 0x1) +#define ONEWIRE_ROM_FAMILY(x) ((u_char)(x) & 0xff) +#define ONEWIRE_ROM_FAMILY_TYPE(x) ((u_char)(x) & 0x7f) +#define ONEWIRE_ROM_FAMILY_CUSTOM(x) ((u_char)((x) >> 7) & 0x1) /* Serial number */ #define ONEWIRE_ROM_SN(x) (((x) >> 8) & 0xffffffffffffULL) |