]> granicus.if.org Git - php/commitdiff
Clarify that our usage of gettimeofday() is infallible
authorNikita Popov <nikita.ppv@gmail.com>
Mon, 9 Sep 2019 15:11:22 +0000 (17:11 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Mon, 9 Sep 2019 15:11:22 +0000 (17:11 +0200)
And that false can't be returned for this reason.

ext/standard/microtime.c

index 46d1a7b2784aa2c46ec1c5b9a54262b2a4d18630..9bd45e188d0ee9ac4a045b610e12ce1eff8c6c71 100644 (file)
@@ -57,7 +57,7 @@ static void _php_gettimeofday(INTERNAL_FUNCTION_PARAMETERS, int mode)
        ZEND_PARSE_PARAMETERS_END();
 
        if (gettimeofday(&tp, NULL)) {
-               RETURN_FALSE;
+               ZEND_ASSERT(0 && "gettimeofday() can't fail");
        }
 
        if (get_as_float) {