]> granicus.if.org Git - icinga2/commitdiff
Remove redundant error check in Utility::GetTime
authorGunnar Beutner <gunnar@beutner.name>
Tue, 3 Mar 2015 08:16:53 +0000 (09:16 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Tue, 3 Mar 2015 08:23:29 +0000 (09:23 +0100)
Coverity Bug ID: 1167732

lib/base/utility.cpp

index 543a65bb64af3916f1bbf9d91fbb1bc7d5fd779e..ce10c757382aa9cbf335e88cf580514d0cac694a 100644 (file)
@@ -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 */