summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_socket2.c
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2019-02-15 05:55:21 +0000
committerdlg <dlg@openbsd.org>2019-02-15 05:55:21 +0000
commitedab645e68b5bf4d4b590ebc78778915ffb91f6c (patch)
treeb8fdcd5df912fb5c5372662ea02703c9aa411ed0 /sys/kern/uipc_socket2.c
parentRemove/simplify historic shell lesson; fix sentence fragment. ok deraadt@ (diff)
downloadwireguard-openbsd-edab645e68b5bf4d4b590ebc78778915ffb91f6c.tar.xz
wireguard-openbsd-edab645e68b5bf4d4b590ebc78778915ffb91f6c.zip
let sbcreatecontrol take a const void * instead of a caddr_t.
this makes it easier to call since you don't have to cast to caddr_t if it's a void *. this also changes a size argument from int to size_t. ok claudio@
Diffstat (limited to 'sys/kern/uipc_socket2.c')
-rw-r--r--sys/kern/uipc_socket2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c
index cb6dedcb1a8..4b9b79100fb 100644
--- a/sys/kern/uipc_socket2.c
+++ b/sys/kern/uipc_socket2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_socket2.c,v 1.99 2018/11/19 13:15:37 visa Exp $ */
+/* $OpenBSD: uipc_socket2.c,v 1.100 2019/02/15 05:55:21 dlg Exp $ */
/* $NetBSD: uipc_socket2.c,v 1.11 1996/02/04 02:17:55 christos Exp $ */
/*
@@ -1020,14 +1020,14 @@ sbdroprecord(struct sockbuf *sb)
* with the specified type for presentation on a socket buffer.
*/
struct mbuf *
-sbcreatecontrol(caddr_t p, int size, int type, int level)
+sbcreatecontrol(const void *p, size_t size, int type, int level)
{
struct cmsghdr *cp;
struct mbuf *m;
if (CMSG_SPACE(size) > MCLBYTES) {
- printf("sbcreatecontrol: message too large %d\n", size);
- return NULL;
+ printf("sbcreatecontrol: message too large %zu\n", size);
+ return (NULL);
}
if ((m = m_get(M_DONTWAIT, MT_CONTROL)) == NULL)