Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/compat Fix const argument inconsistency (found by l...
details: https://anonhg.NetBSD.org/src/rev/3bf0daa53aa3
branches: trunk
changeset: 828679:3bf0daa53aa3
user: christos <christos%NetBSD.org@localhost>
date: Tue Dec 26 17:01:25 2017 +0000
description:
Fix const argument inconsistency (found by lint(1))
diffstat:
lib/libc/compat/include/lwp.h | 4 ++--
lib/libc/compat/sys/compat___lwp_park50.c | 11 ++++++++---
2 files changed, 10 insertions(+), 5 deletions(-)
diffs (49 lines):
diff -r efbb125a2d97 -r 3bf0daa53aa3 lib/libc/compat/include/lwp.h
--- a/lib/libc/compat/include/lwp.h Tue Dec 26 17:00:50 2017 +0000
+++ b/lib/libc/compat/include/lwp.h Tue Dec 26 17:01:25 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lwp.h,v 1.4 2014/01/31 20:45:49 christos Exp $ */
+/* $NetBSD: lwp.h,v 1.5 2017/12/26 17:01:25 christos Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
struct timespec50;
int _lwp_park(const struct timespec50 *, lwpid_t, const void *, const void *);
int ___lwp_park50(const struct timespec *, lwpid_t, const void *, const void *);
-int ___lwp_park60(clockid_t, int, const struct timespec *, lwpid_t,
+int ___lwp_park60(clockid_t, int, struct timespec *, lwpid_t,
const void *, const void *);
__END_DECLS
diff -r efbb125a2d97 -r 3bf0daa53aa3 lib/libc/compat/sys/compat___lwp_park50.c
--- a/lib/libc/compat/sys/compat___lwp_park50.c Tue Dec 26 17:00:50 2017 +0000
+++ b/lib/libc/compat/sys/compat___lwp_park50.c Tue Dec 26 17:01:25 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat___lwp_park50.c,v 1.2 2014/01/31 20:45:49 christos Exp $ */
+/* $NetBSD: compat___lwp_park50.c,v 1.3 2017/12/26 17:01:25 christos Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: compat___lwp_park50.c,v 1.2 2014/01/31 20:45:49 christos Exp $");
+__RCSID("$NetBSD: compat___lwp_park50.c,v 1.3 2017/12/26 17:01:25 christos Exp $");
#endif /* LIBC_SCCS and not lint */
#define __LIBC12_SOURCE__
@@ -53,6 +53,11 @@
___lwp_park50(const struct timespec *ts, lwpid_t unpark, const void *hint,
const void *unparkhint)
{
- return ___lwp_park60(CLOCK_REALTIME, TIMER_ABSTIME, ts, unpark,
+ struct timespec ts1, *tsp = &ts1;
+ if (ts)
+ ts1 = *ts;
+ else
+ tsp = NULL;
+ return ___lwp_park60(CLOCK_REALTIME, TIMER_ABSTIME, tsp, unpark,
hint, unparkhint);
}
Home |
Main Index |
Thread Index |
Old Index