diff options
Diffstat (limited to 'usr.sbin/bluetooth/sdpd/profile.c')
-rw-r--r-- | usr.sbin/bluetooth/sdpd/profile.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/bluetooth/sdpd/profile.c b/usr.sbin/bluetooth/sdpd/profile.c index 3c6ada6871c7..e6d81f8ef4b1 100644 --- a/usr.sbin/bluetooth/sdpd/profile.c +++ b/usr.sbin/bluetooth/sdpd/profile.c @@ -32,6 +32,7 @@ * $Id: profile.c,v 1.6 2004/01/13 19:31:54 max Exp $ */ +#include <sys/param.h> #include <sys/queue.h> #define L2CAP_SOCKET_CHECKED #include <bluetooth.h> @@ -77,7 +78,7 @@ profile_get_descriptor(uint16_t uuid) int32_t i; - for (i = 0; i < sizeof(profiles)/sizeof(profiles[0]); i++) + for (i = 0; i < nitems(profiles); i++) if (profiles[i]->uuid == uuid) return (profiles[i]); @@ -444,7 +445,7 @@ bnep_profile_create_protocol_descriptor_list( }; uint16_t i, psm, version = 0x0100, - nptypes = sizeof(ptype)/sizeof(ptype[0]), + nptypes = nitems(ptype), nptypes_size = nptypes * 3; if (datalen != 2 || 18 + nptypes_size > 255 || |