From 1b0d0d120a8078e573e0e07cbb96869a953ef563 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Fri, 10 Dec 2021 23:11:52 +0100 Subject: [PATCH] remove superfluous null check --- ion_private.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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); -- 2.30.2