remove superfluous null check
authorMichael Wallner <mike@php.net>
Fri, 10 Dec 2021 22:11:52 +0000 (23:11 +0100)
committerMichael Wallner <mike@php.net>
Tue, 14 Dec 2021 11:54:08 +0000 (12:54 +0100)
ion_private.h

index 5f2cc306ee1ef0926b7c8a5730475a087304ea3d..7a3de5155481360e1bba00ba63f0df2192516c37 100644 (file)
@@ -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);