From a81110e746d52da11103a5c4c46c0bab809d8598 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Tue, 21 Dec 2021 08:33:23 +0100 Subject: [PATCH] use ION_STRING_EQUALS API --- ion_private.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ion_private.h b/ion_private.h index 5264b0b..6dc21d4 100644 --- a/ion_private.h +++ b/ion_private.h @@ -2106,10 +2106,8 @@ static inline void php_ion_unserialize_annotations(php_ion_unserializer *ser) ION_CHECK(ion_reader_get_an_annotation(ser->reader, i, &ann_str)); if (ann_str.length != 1) { - if (ann_str.length == ION_SYS_STRLEN_SHARED_SYMBOL_TABLE) { - if (!memcmp(ann_str.value, ION_SYMBOL_SHARED_SYMBOL_TABLE_BYTES, ION_SYS_STRLEN_SHARED_SYMBOL_TABLE)) { - ser->annotations.shared_symtab = true; - } + if (ION_STRING_EQUALS(&ann_str, &ION_SYMBOL_SHARED_SYMBOL_TABLE_STRING)) { + ser->annotations.shared_symtab = true; } continue; } -- 2.30.2