diff options
Diffstat (limited to 'usr.sbin/bluetooth/sdpd')
34 files changed, 45 insertions, 80 deletions
diff --git a/usr.sbin/bluetooth/sdpd/Makefile b/usr.sbin/bluetooth/sdpd/Makefile index 65c1df35d12c..aabb16d4c3ca 100644 --- a/usr.sbin/bluetooth/sdpd/Makefile +++ b/usr.sbin/bluetooth/sdpd/Makefile @@ -1,5 +1,4 @@ # $Id: Makefile,v 1.1 2004/01/20 21:27:55 max Exp $ -# $FreeBSD$ PACKAGE= bluetooth PROG= sdpd diff --git a/usr.sbin/bluetooth/sdpd/Makefile.depend b/usr.sbin/bluetooth/sdpd/Makefile.depend index feddf3a700bc..de7bb33fd2e5 100644 --- a/usr.sbin/bluetooth/sdpd/Makefile.depend +++ b/usr.sbin/bluetooth/sdpd/Makefile.depend @@ -1,8 +1,6 @@ -# $FreeBSD$ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/arpa \ include/xlocale \ diff --git a/usr.sbin/bluetooth/sdpd/audio_sink.c b/usr.sbin/bluetooth/sdpd/audio_sink.c index 0ffdfa88146b..3b631376d02a 100644 --- a/usr.sbin/bluetooth/sdpd/audio_sink.c +++ b/usr.sbin/bluetooth/sdpd/audio_sink.c @@ -1,5 +1,5 @@ /*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2019 Hans Petter Selasky <hselasky@freebsd.org> * All rights reserved. @@ -24,8 +24,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ #include <sys/queue.h> diff --git a/usr.sbin/bluetooth/sdpd/audio_source.c b/usr.sbin/bluetooth/sdpd/audio_source.c index 1d58a323f8cb..be827527732d 100644 --- a/usr.sbin/bluetooth/sdpd/audio_source.c +++ b/usr.sbin/bluetooth/sdpd/audio_source.c @@ -1,5 +1,5 @@ /*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2019 Hans Petter Selasky <hselasky@freebsd.org> * All rights reserved. @@ -24,8 +24,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ #include <sys/queue.h> diff --git a/usr.sbin/bluetooth/sdpd/bgd.c b/usr.sbin/bluetooth/sdpd/bgd.c index 75306ce49c6d..628389efc8e1 100644 --- a/usr.sbin/bluetooth/sdpd/bgd.c +++ b/usr.sbin/bluetooth/sdpd/bgd.c @@ -1,7 +1,7 @@ /*- * bgd.c * - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> * All rights reserved. @@ -28,7 +28,6 @@ * SUCH DAMAGE. * * $Id: bgd.c,v 1.4 2004/01/13 01:54:39 max Exp $ - * $FreeBSD$ */ #define L2CAP_SOCKET_CHECKED #include <bluetooth.h> diff --git a/usr.sbin/bluetooth/sdpd/dun.c b/usr.sbin/bluetooth/sdpd/dun.c index 8c21604a05aa..3f4159926275 100644 --- a/usr.sbin/bluetooth/sdpd/dun.c +++ b/usr.sbin/bluetooth/sdpd/dun.c @@ -1,7 +1,7 @@ /*- * dun.c * - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> * All rights reserved. @@ -28,7 +28,6 @@ * SUCH DAMAGE. * * $Id: dun.c,v 1.5 2004/01/13 01:54:39 max Exp $ - * $FreeBSD$ */ #include <sys/queue.h> diff --git a/usr.sbin/bluetooth/sdpd/ftrn.c b/usr.sbin/bluetooth/sdpd/ftrn.c index 23cfab4eceb5..32b4912f25ed 100644 --- a/usr.sbin/bluetooth/sdpd/ftrn.c +++ b/usr.sbin/bluetooth/sdpd/ftrn.c @@ -1,7 +1,7 @@ /*- * ftrn.c * - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> * All rights reserved. @@ -28,7 +28,6 @@ * SUCH DAMAGE. * * $Id: ftrn.c,v 1.5 2004/01/13 01:54:39 max Exp $ - * $FreeBSD$ */ #include <sys/queue.h> diff --git a/usr.sbin/bluetooth/sdpd/gn.c b/usr.sbin/bluetooth/sdpd/gn.c index 894701b81481..17879c4fb193 100644 --- a/usr.sbin/bluetooth/sdpd/gn.c +++ b/usr.sbin/bluetooth/sdpd/gn.c @@ -3,7 +3,7 @@ */ /*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2008 Maksim Yevmenkin <m_evmenkin@yahoo.com> * All rights reserved. @@ -30,7 +30,6 @@ * SUCH DAMAGE. * * $Id: gn.c,v 1.1 2008/03/11 00:02:42 max Exp $ - * $FreeBSD$ */ #include <sys/queue.h> diff --git a/usr.sbin/bluetooth/sdpd/irmc.c b/usr.sbin/bluetooth/sdpd/irmc.c index ee91335dbe38..90155e065492 100644 --- a/usr.sbin/bluetooth/sdpd/irmc.c +++ b/usr.sbin/bluetooth/sdpd/irmc.c @@ -1,7 +1,7 @@ /*- * irmc.c * - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> * All rights reserved. @@ -28,7 +28,6 @@ * SUCH DAMAGE. * * $Id: irmc.c,v 1.6 2004/01/13 19:31:54 max Exp $ - * $FreeBSD$ */ #include <sys/queue.h> diff --git a/usr.sbin/bluetooth/sdpd/irmc_command.c b/usr.sbin/bluetooth/sdpd/irmc_command.c index 3b7e38bdf7f9..e8d0723fa8a4 100644 --- a/usr.sbin/bluetooth/sdpd/irmc_command.c +++ b/usr.sbin/bluetooth/sdpd/irmc_command.c @@ -1,7 +1,7 @@ /*- * irmc_command_command_command.c * - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> * All rights reserved. @@ -28,7 +28,6 @@ * SUCH DAMAGE. * * $Id: irmc_command.c,v 1.5 2004/01/13 01:54:39 max Exp $ - * $FreeBSD$ */ #include <sys/queue.h> diff --git a/usr.sbin/bluetooth/sdpd/lan.c b/usr.sbin/bluetooth/sdpd/lan.c index 86ef71f64f2e..66a71754ef48 100644 --- a/usr.sbin/bluetooth/sdpd/lan.c +++ b/usr.sbin/bluetooth/sdpd/lan.c @@ -1,7 +1,7 @@ /*- * lan.c * - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> * All rights reserved. @@ -28,7 +28,6 @@ * SUCH DAMAGE. * * $Id: lan.c,v 1.5 2004/01/13 01:54:39 max Exp $ - * $FreeBSD$ */ #include <arpa/inet.h> diff --git a/usr.sbin/bluetooth/sdpd/log.c b/usr.sbin/bluetooth/sdpd/log.c index 98d3526e9121..f7d4fa350c65 100644 --- a/usr.sbin/bluetooth/sdpd/log.c +++ b/usr.sbin/bluetooth/sdpd/log.c @@ -1,7 +1,7 @@ /*- * log.c * - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> * All rights reserved. @@ -28,7 +28,6 @@ * SUCH DAMAGE. * * $Id: log.c,v 1.1 2004/01/07 23:15:00 max Exp $ - * $FreeBSD$ */ #include <sys/types.h> diff --git a/usr.sbin/bluetooth/sdpd/log.h b/usr.sbin/bluetooth/sdpd/log.h index b2c780e5e83e..e00ed4d8c838 100644 --- a/usr.sbin/bluetooth/sdpd/log.h +++ b/usr.sbin/bluetooth/sdpd/log.h @@ -1,7 +1,7 @@ /*- * log.h * - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> * All rights reserved. @@ -28,7 +28,6 @@ * SUCH DAMAGE. * * $Id: log.h,v 1.1 2004/01/07 23:15:00 max Exp $ - * $FreeBSD$ */ #ifndef _LOG_H_ diff --git a/usr.sbin/bluetooth/sdpd/main.c b/usr.sbin/bluetooth/sdpd/main.c index a041795e9846..cc21b314f486 100644 --- a/usr.sbin/bluetooth/sdpd/main.c +++ b/usr.sbin/bluetooth/sdpd/main.c @@ -1,7 +1,7 @@ /*- * main.c * - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> * All rights reserved. @@ -28,7 +28,6 @@ * SUCH DAMAGE. * * $Id: main.c,v 1.8 2004/01/13 19:31:54 max Exp $ - * $FreeBSD$ */ #include <sys/select.h> diff --git a/usr.sbin/bluetooth/sdpd/nap.c b/usr.sbin/bluetooth/sdpd/nap.c index 16054af657fe..229600b9c950 100644 --- a/usr.sbin/bluetooth/sdpd/nap.c +++ b/usr.sbin/bluetooth/sdpd/nap.c @@ -3,7 +3,7 @@ */ /*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2008 Maksim Yevmenkin <m_evmenkin@yahoo.com> * All rights reserved. @@ -30,7 +30,6 @@ * SUCH DAMAGE. * * $Id: nap.c,v 1.1 2008/03/11 00:02:42 max Exp $ - * $FreeBSD$ */ #include <sys/queue.h> diff --git a/usr.sbin/bluetooth/sdpd/opush.c b/usr.sbin/bluetooth/sdpd/opush.c index 91e08af30d4d..6f2464191292 100644 --- a/usr.sbin/bluetooth/sdpd/opush.c +++ b/usr.sbin/bluetooth/sdpd/opush.c @@ -1,7 +1,7 @@ /*- * opush.c * - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> * All rights reserved. @@ -28,7 +28,6 @@ * SUCH DAMAGE. * * $Id: opush.c,v 1.6 2004/01/13 19:31:54 max Exp $ - * $FreeBSD$ */ #include <sys/queue.h> diff --git a/usr.sbin/bluetooth/sdpd/panu.c b/usr.sbin/bluetooth/sdpd/panu.c index 353c28709e03..bba1dbd45d1d 100644 --- a/usr.sbin/bluetooth/sdpd/panu.c +++ b/usr.sbin/bluetooth/sdpd/panu.c @@ -3,7 +3,7 @@ */ /*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2008 Maksim Yevmenkin <m_evmenkin@yahoo.com> * All rights reserved. @@ -30,7 +30,6 @@ * SUCH DAMAGE. * * $Id: panu.c,v 1.1 2008/03/11 00:02:42 max Exp $ - * $FreeBSD$ */ #include <sys/queue.h> diff --git a/usr.sbin/bluetooth/sdpd/profile.c b/usr.sbin/bluetooth/sdpd/profile.c index cef9a03ceea6..e6d81f8ef4b1 100644 --- a/usr.sbin/bluetooth/sdpd/profile.c +++ b/usr.sbin/bluetooth/sdpd/profile.c @@ -3,7 +3,7 @@ */ /*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> * All rights reserved. @@ -30,9 +30,9 @@ * SUCH DAMAGE. * * $Id: profile.c,v 1.6 2004/01/13 19:31:54 max Exp $ - * $FreeBSD$ */ +#include <sys/param.h> #include <sys/queue.h> #define L2CAP_SOCKET_CHECKED #include <bluetooth.h> @@ -78,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]); @@ -445,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 || diff --git a/usr.sbin/bluetooth/sdpd/profile.h b/usr.sbin/bluetooth/sdpd/profile.h index 82e0e37f853d..7184c0fd742e 100644 --- a/usr.sbin/bluetooth/sdpd/profile.h +++ b/usr.sbin/bluetooth/sdpd/profile.h @@ -3,7 +3,7 @@ */ /*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> * All rights reserved. @@ -30,7 +30,6 @@ * SUCH DAMAGE. * * $Id: profile.h,v 1.6 2004/01/13 19:31:54 max Exp $ - * $FreeBSD$ */ #ifndef _PROFILE_H_ diff --git a/usr.sbin/bluetooth/sdpd/provider.c b/usr.sbin/bluetooth/sdpd/provider.c index 532cdac8cd9f..7ac800a85006 100644 --- a/usr.sbin/bluetooth/sdpd/provider.c +++ b/usr.sbin/bluetooth/sdpd/provider.c @@ -1,7 +1,7 @@ /*- * provider.c * - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> * All rights reserved. @@ -28,7 +28,6 @@ * SUCH DAMAGE. * * $Id: provider.c,v 1.5 2004/01/13 01:54:39 max Exp $ - * $FreeBSD$ */ #include <sys/queue.h> diff --git a/usr.sbin/bluetooth/sdpd/provider.h b/usr.sbin/bluetooth/sdpd/provider.h index 6f6bed3e820a..b4f3bb0a46d0 100644 --- a/usr.sbin/bluetooth/sdpd/provider.h +++ b/usr.sbin/bluetooth/sdpd/provider.h @@ -1,7 +1,7 @@ /*- * provider.h * - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> * All rights reserved. @@ -28,7 +28,6 @@ * SUCH DAMAGE. * * $Id: provider.h,v 1.6 2004/01/13 01:54:39 max Exp $ - * $FreeBSD$ */ #ifndef _PROVIDER_H_ diff --git a/usr.sbin/bluetooth/sdpd/sar.c b/usr.sbin/bluetooth/sdpd/sar.c index ce911911b503..68193b567fd3 100644 --- a/usr.sbin/bluetooth/sdpd/sar.c +++ b/usr.sbin/bluetooth/sdpd/sar.c @@ -1,7 +1,7 @@ /*- * sar.c * - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> * All rights reserved. @@ -28,9 +28,9 @@ * SUCH DAMAGE. * * $Id: sar.c,v 1.2 2004/01/08 23:46:51 max Exp $ - * $FreeBSD$ */ +#include <sys/param.h> #include <sys/queue.h> #include <sys/uio.h> #include <netinet/in.h> @@ -305,7 +305,7 @@ server_send_service_attribute_response(server_p srv, int32_t fd) iov[3].iov_len = 1 + cs[0]; do { - size = writev(fd, (struct iovec const *) &iov, sizeof(iov)/sizeof(iov[0])); + size = writev(fd, (struct iovec const *) &iov, nitems(iov)); } while (size < 0 && errno == EINTR); /* Check if we have sent (or failed to sent) last response chunk */ diff --git a/usr.sbin/bluetooth/sdpd/scr.c b/usr.sbin/bluetooth/sdpd/scr.c index b3442915341f..a5bced947f8e 100644 --- a/usr.sbin/bluetooth/sdpd/scr.c +++ b/usr.sbin/bluetooth/sdpd/scr.c @@ -1,7 +1,7 @@ /*- * scr.c * - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> * All rights reserved. @@ -28,7 +28,6 @@ * SUCH DAMAGE. * * $Id: scr.c,v 1.1 2004/01/13 01:54:39 max Exp $ - * $FreeBSD$ */ #include <sys/queue.h> diff --git a/usr.sbin/bluetooth/sdpd/sd.c b/usr.sbin/bluetooth/sdpd/sd.c index e69e3366fa4c..cd4f7fa3364b 100644 --- a/usr.sbin/bluetooth/sdpd/sd.c +++ b/usr.sbin/bluetooth/sdpd/sd.c @@ -1,7 +1,7 @@ /*- * sd.c * - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> * All rights reserved. @@ -28,7 +28,6 @@ * SUCH DAMAGE. * * $Id: sd.c,v 1.4 2004/01/13 01:54:39 max Exp $ - * $FreeBSD$ */ #include <sys/queue.h> diff --git a/usr.sbin/bluetooth/sdpd/sdpd.8 b/usr.sbin/bluetooth/sdpd/sdpd.8 index 17040663a7ac..b5915f729e46 100644 --- a/usr.sbin/bluetooth/sdpd/sdpd.8 +++ b/usr.sbin/bluetooth/sdpd/sdpd.8 @@ -23,7 +23,6 @@ .\" SUCH DAMAGE. .\" .\" $Id: sdpd.8,v 1.1 2004/01/13 19:31:54 max Exp $ -.\" $FreeBSD$ .\" .Dd January 13, 2004 .Dt SDPD 8 diff --git a/usr.sbin/bluetooth/sdpd/server.c b/usr.sbin/bluetooth/sdpd/server.c index 6910807953f5..05a4cb5f0236 100644 --- a/usr.sbin/bluetooth/sdpd/server.c +++ b/usr.sbin/bluetooth/sdpd/server.c @@ -1,7 +1,7 @@ /*- * server.c * - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> * All rights reserved. @@ -28,7 +28,6 @@ * SUCH DAMAGE. * * $Id: server.c,v 1.6 2004/01/13 01:54:39 max Exp $ - * $FreeBSD$ */ #include <sys/param.h> @@ -346,14 +345,12 @@ server_accept_client(server_p srv, int32_t fd) return; } } else { - struct xucred cr; + uid_t uid; + gid_t gid; struct passwd *pw; /* Get peer's credentials */ - memset(&cr, 0, sizeof(cr)); - size = sizeof(cr); - - if (getsockopt(cfd, 0, LOCAL_PEERCRED, &cr, &size) < 0) { + if (getpeereid(cfd, &uid, &gid) < 0) { log_err("Could not get peer's credentials. %s (%d)", strerror(errno), errno); close(cfd); @@ -361,12 +358,12 @@ server_accept_client(server_p srv, int32_t fd) } /* Check credentials */ - pw = getpwuid(cr.cr_uid); + pw = getpwuid(uid); if (pw != NULL) priv = (strcmp(pw->pw_name, "root") == 0); else log_warning("Could not verify credentials for uid %d", - cr.cr_uid); + uid); memcpy(&srv->req_sa.l2cap_bdaddr, NG_HCI_BDADDR_ANY, sizeof(srv->req_sa.l2cap_bdaddr)); diff --git a/usr.sbin/bluetooth/sdpd/server.h b/usr.sbin/bluetooth/sdpd/server.h index 01629e89a789..9a1cb86eb3da 100644 --- a/usr.sbin/bluetooth/sdpd/server.h +++ b/usr.sbin/bluetooth/sdpd/server.h @@ -1,7 +1,7 @@ /*- * server.h * - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> * All rights reserved. @@ -28,7 +28,6 @@ * SUCH DAMAGE. * * $Id: server.h,v 1.5 2004/01/13 01:54:39 max Exp $ - * $FreeBSD$ */ #ifndef _SERVER_H_ diff --git a/usr.sbin/bluetooth/sdpd/sp.c b/usr.sbin/bluetooth/sdpd/sp.c index a909cd181ed1..3c79dd93965d 100644 --- a/usr.sbin/bluetooth/sdpd/sp.c +++ b/usr.sbin/bluetooth/sdpd/sp.c @@ -1,7 +1,7 @@ /*- * sp.c * - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> * All rights reserved. @@ -28,7 +28,6 @@ * SUCH DAMAGE. * * $Id: sp.c,v 1.5 2004/01/13 01:54:39 max Exp $ - * $FreeBSD$ */ #include <sys/queue.h> diff --git a/usr.sbin/bluetooth/sdpd/srr.c b/usr.sbin/bluetooth/sdpd/srr.c index 4f031f5933b1..b16eb25c9ea4 100644 --- a/usr.sbin/bluetooth/sdpd/srr.c +++ b/usr.sbin/bluetooth/sdpd/srr.c @@ -1,7 +1,7 @@ /*- * srr.c * - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> * All rights reserved. @@ -28,9 +28,9 @@ * SUCH DAMAGE. * * $Id: srr.c,v 1.1 2004/01/13 01:54:39 max Exp $ - * $FreeBSD$ */ +#include <sys/param.h> #include <sys/queue.h> #include <sys/uio.h> #include <netinet/in.h> @@ -130,7 +130,7 @@ server_send_service_register_response(server_p srv, int32_t fd) iov[1].iov_len = srv->fdidx[fd].rsp_size; do { - size = writev(fd, (struct iovec const *) &iov, sizeof(iov)/sizeof(iov[0])); + size = writev(fd, (struct iovec const *) &iov, nitems(iov)); } while (size < 0 && errno == EINTR); srv->fdidx[fd].rsp_cs = 0; diff --git a/usr.sbin/bluetooth/sdpd/ssar.c b/usr.sbin/bluetooth/sdpd/ssar.c index 68cfa2facd21..fad498c2b34a 100644 --- a/usr.sbin/bluetooth/sdpd/ssar.c +++ b/usr.sbin/bluetooth/sdpd/ssar.c @@ -1,7 +1,7 @@ /*- * ssar.c * - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> * All rights reserved. @@ -28,7 +28,6 @@ * SUCH DAMAGE. * * $Id: ssar.c,v 1.4 2004/01/12 22:54:31 max Exp $ - * $FreeBSD$ */ #include <sys/queue.h> diff --git a/usr.sbin/bluetooth/sdpd/ssr.c b/usr.sbin/bluetooth/sdpd/ssr.c index 939283dbb809..1a29dde97ee5 100644 --- a/usr.sbin/bluetooth/sdpd/ssr.c +++ b/usr.sbin/bluetooth/sdpd/ssr.c @@ -1,7 +1,7 @@ /*- * ssr.c * - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> * All rights reserved. @@ -28,9 +28,9 @@ * SUCH DAMAGE. * * $Id: ssr.c,v 1.5 2004/01/13 01:54:39 max Exp $ - * $FreeBSD$ */ +#include <sys/param.h> #include <sys/queue.h> #include <sys/uio.h> #include <netinet/in.h> @@ -270,7 +270,7 @@ server_send_service_search_response(server_p srv, int32_t fd) iov[3].iov_len = 1 + cs[0]; do { - size = writev(fd, (struct iovec const *) &iov, sizeof(iov)/sizeof(iov[0])); + size = writev(fd, (struct iovec const *) &iov, nitems(iov)); } while (size < 0 && errno == EINTR); /* Check if we have sent (or failed to sent) last response chunk */ diff --git a/usr.sbin/bluetooth/sdpd/sur.c b/usr.sbin/bluetooth/sdpd/sur.c index ca561f693e1c..43581be0bbf1 100644 --- a/usr.sbin/bluetooth/sdpd/sur.c +++ b/usr.sbin/bluetooth/sdpd/sur.c @@ -1,7 +1,7 @@ /*- * sur.c * - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> * All rights reserved. @@ -28,7 +28,6 @@ * SUCH DAMAGE. * * $Id: sur.c,v 1.1 2004/01/13 01:54:39 max Exp $ - * $FreeBSD$ */ #include <sys/queue.h> diff --git a/usr.sbin/bluetooth/sdpd/uuid-private.h b/usr.sbin/bluetooth/sdpd/uuid-private.h index 7f3d299e8dbf..8a3f9bb1c62b 100644 --- a/usr.sbin/bluetooth/sdpd/uuid-private.h +++ b/usr.sbin/bluetooth/sdpd/uuid-private.h @@ -1,7 +1,7 @@ /*- * uuid-private.h * - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2005 Maksim Yevmenkin <m_evmenkin@yahoo.com> * All rights reserved. @@ -28,7 +28,6 @@ * SUCH DAMAGE. * * $Id: uuid-private.h,v 1.1 2004/12/09 18:20:26 max Exp $ - * $FreeBSD$ */ #ifndef _UUID_PRIVATE_H_ diff --git a/usr.sbin/bluetooth/sdpd/uuid.c b/usr.sbin/bluetooth/sdpd/uuid.c index 3d41ea3e15b3..90a6d5b17322 100644 --- a/usr.sbin/bluetooth/sdpd/uuid.c +++ b/usr.sbin/bluetooth/sdpd/uuid.c @@ -1,7 +1,7 @@ /*- * uuid.c * - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2005 Maksim Yevmenkin <m_evmenkin@yahoo.com> * All rights reserved. @@ -28,7 +28,6 @@ * SUCH DAMAGE. * * $Id: uuid.c,v 1.1 2004/12/09 18:20:26 max Exp $ - * $FreeBSD$ */ #define L2CAP_SOCKET_CHECKED #include <bluetooth.h> |
