Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/gen return 0 on unsupported bases.
details: https://anonhg.NetBSD.org/src/rev/1386b633f6ce
branches: trunk
changeset: 348086:1386b633f6ce
user: christos <christos%NetBSD.org@localhost>
date: Tue Oct 04 12:48:15 2016 +0000
description:
return 0 on unsupported bases.
diffstat:
lib/libc/gen/timespec_get.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (31 lines):
diff -r 88bd5d4316fd -r 1386b633f6ce lib/libc/gen/timespec_get.c
--- a/lib/libc/gen/timespec_get.c Tue Oct 04 10:46:40 2016 +0000
+++ b/lib/libc/gen/timespec_get.c Tue Oct 04 12:48:15 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: timespec_get.c,v 1.1 2016/10/04 09:41:41 kamil Exp $ */
+/* $NetBSD: timespec_get.c,v 1.2 2016/10/04 12:48:15 christos Exp $ */
/*-
* Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: timespec_get.c,v 1.1 2016/10/04 09:41:41 kamil Exp $");
+__RCSID("$NetBSD: timespec_get.c,v 1.2 2016/10/04 12:48:15 christos Exp $");
#endif /* !defined lint */
#include <assert.h>
@@ -47,8 +47,11 @@
switch (base) {
case TIME_UTC:
- if (clock_gettime(CLOCK_REALTIME, ts) != 0)
+ if (clock_gettime(CLOCK_REALTIME, ts) == -1)
return 0;
+ break;
+ default:
+ return 0;
}
return base;
Home |
Main Index |
Thread Index |
Old Index