summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-02-07 20:49:08 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-02-08 12:29:29 +0000
commit1479190c8690f1f72b0bcd62e8a4c81ddbb6b206 (patch)
tree390d270a00e6b67d722bba4ea164a63ffb49c55e /sal
parent5e691dbfb3b2f7803b27f35e6abeb2e0fbc02668 (diff)
coverity#1267668 Logically dead code
Change-Id: Id9458f55efa4d27914c24b8ab7c4ced081e19626
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/time.cxx17
1 files changed, 4 insertions, 13 deletions
diff --git a/sal/osl/unx/time.cxx b/sal/osl/unx/time.cxx
index 1fbd2fb2fe9a..4abd99d4ed48 100644
--- a/sal/osl/unx/time.cxx
+++ b/sal/osl/unx/time.cxx
@@ -25,7 +25,6 @@
#include <osl/diagnose.h>
#include <osl/time.h>
#include <time.h>
-#include <assert.h>
#include <unistd.h>
#ifdef __MACH__
@@ -269,14 +268,11 @@ void sal_initGlobalTimer(void)
clock_get_time(cclock, &startTime);
mach_port_deallocate(mach_task_self(), cclock);
#else /* ! (MACOSX || IOS) */
- int res;
#if defined(USE_CLOCK_GETTIME)
- res = clock_gettime(CLOCK_REALTIME, &startTime);
+ clock_gettime(CLOCK_REALTIME, &startTime);
#else /* Ndef USE_CLOCK_GETTIME */
- res = gettimeofday( &startTime, NULL );
+ gettimeofday( &startTime, NULL );
#endif /* NDef USE_CLOCK_GETTIME */
- assert(res == 0);
- (void) res;
#endif /* ! (MACOSX || IOS) */
}
@@ -296,17 +292,12 @@ sal_uInt32 SAL_CALL osl_getGlobalTimer()
nSeconds = ( nSeconds * 1000 ) + (long) (( currentTime.tv_nsec - startTime.tv_nsec) / 1000000 );
#else
osl_time_t currentTime;
- int res;
#if defined(USE_CLOCK_GETTIME)
- res = clock_gettime(CLOCK_REALTIME, &currentTime);
+ clock_gettime(CLOCK_REALTIME, &currentTime);
#else
- res = gettimeofday( &currentTime, NULL );
+ gettimeofday( &currentTime, NULL );
#endif
- assert(res == 0);
-
- if (res != 0)
- return 0;
nSeconds = (sal_uInt32)( currentTime.tv_sec - startTime.tv_sec );
#if defined(USE_CLOCK_GETTIME)