mirror of https://github.com/Icinga/icinga2.git
Remove redundant error check in Utility::GetTime
Coverity Bug ID: 1167732
This commit is contained in:
parent
274e6e9785
commit
3e12bfef25
|
@ -256,11 +256,8 @@ double Utility::GetTime(void)
|
||||||
#else /* _WIN32 */
|
#else /* _WIN32 */
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
|
|
||||||
if (gettimeofday(&tv, NULL) < 0) {
|
int rc = gettimeofday(&tv, NULL);
|
||||||
BOOST_THROW_EXCEPTION(posix_error()
|
VERIFY(rc >= 0);
|
||||||
<< boost::errinfo_api_function("gettimeofday")
|
|
||||||
<< boost::errinfo_errno(errno));
|
|
||||||
}
|
|
||||||
|
|
||||||
return tv.tv_sec + tv.tv_usec / 1000000.0;
|
return tv.tv_sec + tv.tv_usec / 1000000.0;
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
|
|
Loading…
Reference in New Issue