From 3e12bfef25da7528763eabb9e51e3e3637624600 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 3 Mar 2015 09:16:53 +0100 Subject: [PATCH] Remove redundant error check in Utility::GetTime Coverity Bug ID: 1167732 --- lib/base/utility.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/base/utility.cpp b/lib/base/utility.cpp index 543a65bb6..ce10c7573 100644 --- a/lib/base/utility.cpp +++ b/lib/base/utility.cpp @@ -256,11 +256,8 @@ double Utility::GetTime(void) #else /* _WIN32 */ struct timeval tv; - if (gettimeofday(&tv, NULL) < 0) { - BOOST_THROW_EXCEPTION(posix_error() - << boost::errinfo_api_function("gettimeofday") - << boost::errinfo_errno(errno)); - } + int rc = gettimeofday(&tv, NULL); + VERIFY(rc >= 0); return tv.tv_sec + tv.tv_usec / 1000000.0; #endif /* _WIN32 */