Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/librumpuser check clock_gettime() rv



details:   https://anonhg.NetBSD.org/src/rev/ebb81df5fbc3
branches:  trunk
changeset: 803600:ebb81df5fbc3
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Nov 05 00:43:55 2014 +0000

description:
check clock_gettime() rv

diffstat:

 lib/librumpuser/rumpuser.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r f661c8a3239c -r ebb81df5fbc3 lib/librumpuser/rumpuser.c
--- a/lib/librumpuser/rumpuser.c        Wed Nov 05 00:16:19 2014 +0000
+++ b/lib/librumpuser/rumpuser.c        Wed Nov 05 00:43:55 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rumpuser.c,v 1.63 2014/07/25 14:00:31 justin Exp $     */
+/*     $NetBSD: rumpuser.c,v 1.64 2014/11/05 00:43:55 pooka Exp $      */
 
 /*
  * Copyright (c) 2007-2010 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
 #include "rumpuser_port.h"
 
 #if !defined(lint)
-__RCSID("$NetBSD: rumpuser.c,v 1.63 2014/07/25 14:00:31 justin Exp $");
+__RCSID("$NetBSD: rumpuser.c,v 1.64 2014/11/05 00:43:55 pooka Exp $");
 #endif /* !lint */
 
 #include <sys/stat.h>
@@ -143,7 +143,8 @@
 #else
                        /* le/la/der/die/das sigh. timevalspec tailspin */
                        struct timespec ts, tsr;
-                       clock_gettime(CLOCK_REALTIME, &ts);
+                       if ((rv = clock_gettime(CLOCK_REALTIME, &ts)) == -1)
+                               continue;
                        if (ts.tv_sec == rqt.tv_sec ?
                            ts.tv_nsec > rqt.tv_nsec : ts.tv_sec > rqt.tv_sec) {
                                rv = 0;



Home | Main Index | Thread Index | Old Index