]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
delay assignment until after REQUIRE
authorMark Andrews <marka@isc.org>
Thu, 30 Jan 2020 07:56:03 +0000 (18:56 +1100)
committerMark Andrews <marka@isc.org>
Thu, 30 Jan 2020 07:56:03 +0000 (18:56 +1100)
lib/isc/timer.c

index fce37e02a5b39563c1906a87d4d93e438050e24d..2d675f371232f6ac1065288bdc4d4b52bd671d54 100644 (file)
@@ -666,8 +666,8 @@ static void
 set_index(void *what, unsigned int index) {
        isc__timer_t *timer;
 
+       REQUIRE(VALID_TIMER(what));
        timer = what;
-       REQUIRE(VALID_TIMER(timer));
 
        timer->index = index;
 }