From: Michael Wallner Date: Fri, 10 Dec 2021 22:11:52 +0000 (+0100) Subject: remove superfluous null check X-Git-Tag: v0.1.0~85 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=1b0d0d120a8078e573e0e07cbb96869a953ef563;p=awesomized%2Fext-ion remove superfluous null check --- diff --git a/ion_private.h b/ion_private.h index 5f2cc30..7a3de51 100644 --- a/ion_private.h +++ b/ion_private.h @@ -1718,19 +1718,13 @@ static inline void php_ion_unserialize_zval(php_ion_unserializer *ser, zval *ret ZVAL_DEREF(return_value); } - BOOL bval; - ION_CHECK(ion_reader_is_null(ser->reader, &bval)); - if (bval) { - goto read_null; - } - switch (ION_TYPE_INT(*typ)) { case tid_NULL_INT: -read_null: ; ION_CHECK(ion_reader_read_null(ser->reader, typ)); RETURN_NULL(); case tid_BOOL_INT: + BOOL bval; ION_CHECK(ion_reader_read_bool(ser->reader, &bval)); RETURN_BOOL(bval);