Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Actually return the updated pointer-to-mbuf-pointer to t...
details: https://anonhg.NetBSD.org/src/rev/f2a8eecb7965
branches: trunk
changeset: 454761:f2a8eecb7965
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Fri Sep 27 00:32:03 2019 +0000
description:
Actually return the updated pointer-to-mbuf-pointer to the caller
rather than discarding-after-assignment. Introduced from the
[pgoyette-compat] branch work.
Welcome to 9.99.14 !!! (Module hook routine prototype changed.)
Found by the lgtm bot, reported via private Email from maxv@
diffstat:
sys/compat/common/kern_uipc_socket_50.c | 12 ++++++------
sys/kern/uipc_socket.c | 6 +++---
sys/sys/compat_stub.h | 4 ++--
sys/sys/param.h | 4 ++--
4 files changed, 13 insertions(+), 13 deletions(-)
diffs (104 lines):
diff -r aa0726d4073c -r f2a8eecb7965 sys/compat/common/kern_uipc_socket_50.c
--- a/sys/compat/common/kern_uipc_socket_50.c Thu Sep 26 22:43:36 2019 +0000
+++ b/sys/compat/common/kern_uipc_socket_50.c Fri Sep 27 00:32:03 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_uipc_socket_50.c,v 1.2 2019/04/15 10:53:17 pgoyette Exp $ */
+/* $NetBSD: kern_uipc_socket_50.c,v 1.3 2019/09/27 00:32:03 pgoyette Exp $ */
/*
* Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_uipc_socket_50.c,v 1.2 2019/04/15 10:53:17 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_uipc_socket_50.c,v 1.3 2019/09/27 00:32:03 pgoyette Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -210,7 +210,7 @@
}
static int
-uipc_socket_50_sbts(int opt, struct mbuf **mp)
+uipc_socket_50_sbts(int opt, struct mbuf ***mp)
{
struct timeval50 tv50;
struct timeval tv;
@@ -220,10 +220,10 @@
if (opt & SO_OTIMESTAMP) {
timeval_to_timeval50(&tv, &tv50);
- *mp = sbcreatecontrol(&tv50, sizeof(tv50), SCM_OTIMESTAMP,
+ **mp = sbcreatecontrol(&tv50, sizeof(tv50), SCM_OTIMESTAMP,
SOL_SOCKET);
- if (*mp)
- mp = &(*mp)->m_next;
+ if (**mp)
+ *mp = &(**mp)->m_next;
return 0;
} else
return EPASSTHROUGH;
diff -r aa0726d4073c -r f2a8eecb7965 sys/kern/uipc_socket.c
--- a/sys/kern/uipc_socket.c Thu Sep 26 22:43:36 2019 +0000
+++ b/sys/kern/uipc_socket.c Fri Sep 27 00:32:03 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_socket.c,v 1.283 2019/09/14 15:06:33 mlelstv Exp $ */
+/* $NetBSD: uipc_socket.c,v 1.284 2019/09/27 00:32:03 pgoyette Exp $ */
/*
* Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.283 2019/09/14 15:06:33 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.284 2019/09/27 00:32:03 pgoyette Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -2419,7 +2419,7 @@
microtime(&tv);
- MODULE_HOOK_CALL(uipc_socket_50_sbts_hook, (opt, mp), enosys(), error);
+ MODULE_HOOK_CALL(uipc_socket_50_sbts_hook, (opt, &mp), enosys(), error);
if (error == 0)
return mp;
diff -r aa0726d4073c -r f2a8eecb7965 sys/sys/compat_stub.h
--- a/sys/sys/compat_stub.h Thu Sep 26 22:43:36 2019 +0000
+++ b/sys/sys/compat_stub.h Fri Sep 27 00:32:03 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_stub.h,v 1.18 2019/07/20 20:59:05 mrg Exp $ */
+/* $NetBSD: compat_stub.h,v 1.19 2019/09/27 00:32:03 pgoyette Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -231,7 +231,7 @@
(int, struct socket *, const struct sockopt *));
MODULE_HOOK(uipc_socket_50_getopt1_hook, int,
(int, struct socket *, struct sockopt *));
-MODULE_HOOK(uipc_socket_50_sbts_hook, int, (int, struct mbuf **));
+MODULE_HOOK(uipc_socket_50_sbts_hook, int, (int, struct mbuf ***));
/*
* uipc_syscalls_50 compatibility
diff -r aa0726d4073c -r f2a8eecb7965 sys/sys/param.h
--- a/sys/sys/param.h Thu Sep 26 22:43:36 2019 +0000
+++ b/sys/sys/param.h Fri Sep 27 00:32:03 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: param.h,v 1.613 2019/09/22 22:59:40 christos Exp $ */
+/* $NetBSD: param.h,v 1.614 2019/09/27 00:32:03 pgoyette Exp $ */
/*-
* Copyright (c) 1982, 1986, 1989, 1993
@@ -67,7 +67,7 @@
* 2.99.9 (299000900)
*/
-#define __NetBSD_Version__ 999001300 /* NetBSD 9.99.13 */
+#define __NetBSD_Version__ 999001400 /* NetBSD 9.99.14 */
#define __NetBSD_Prereq__(M,m,p) (((((M) * 100000000) + \
(m) * 1000000) + (p) * 100) <= __NetBSD_Version__)
Home |
Main Index |
Thread Index |
Old Index