diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-06-02 18:19:48 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-06-02 18:19:48 +0000 |
commit | 98624539afcae58d7d8586924e2e9b51d3297d83 (patch) | |
tree | 432c5c60c053845d369282b3ba4548810243d14a /sys/dev/onewire | |
parent | 593ede1657809e2018493adf7cb73ba4c8d3b3b8 (diff) |
Some casts to please format strings a little bit later on
ok grange
Diffstat (limited to 'sys/dev/onewire')
-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) |