]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fix cppcheck warning: identicalConditionAfterEarlyExit
authorMark Andrews <marka@isc.org>
Tue, 1 Oct 2019 07:05:51 +0000 (17:05 +1000)
committerMark Andrews <marka@isc.org>
Tue, 1 Oct 2019 11:28:23 +0000 (21:28 +1000)
bin/tests/pkcs11/benchmarks/random.c

index 144cfa863feff499e9cf1d26385b149c86b06eb0..c2b5cd5dcaa4ace7d522045dcf8df7390603fa76 100644 (file)
@@ -73,10 +73,10 @@ clock_gettime(int32_t id, struct timespec *tp)
        UNUSED(id);
 
        result = gettimeofday(&tv, NULL);
-       if (result)
-               return (result);
-       tp->tv_sec = tv.tv_sec;
-       tp->tv_nsec = (long) tv.tv_usec * 1000;
+       if (result == 0) {
+               tp->tv_sec = tv.tv_sec;
+               tp->tv_nsec = (long) tv.tv_usec * 1000;
+       }
        return (result);
 }
 #endif