]> granicus.if.org Git - php/commitdiff
Use {0} to initialize instead of {NULL}
authorGeorge Peter Banyard <girgias@php.net>
Thu, 27 Feb 2020 22:32:36 +0000 (23:32 +0100)
committerGeorge Peter Banyard <girgias@php.net>
Thu, 27 Feb 2020 23:21:25 +0000 (00:21 +0100)
Clang emits a [-Wmissing-field-initializers] when using {NULL} instead of {0}

ext/phar/func_interceptors.c
ext/standard/html.c

index 4e5115f8843e89480e53ad8a9a7ecb3f6d44e0c4..f0389bf2052e7672ce1eeba4e0aec9d131d30a2a 100644 (file)
@@ -1100,7 +1100,7 @@ static struct _phar_orig_functions {
        zif_handler orig_lstat;
        zif_handler orig_readfile;
        zif_handler orig_stat;
-} phar_orig_functions = {NULL};
+} phar_orig_functions = {0};
 
 void phar_save_orig_functions(void) /* {{{ */
 {
index b7ca69d74e84419323fdd097b73ddea6d27fc830..5eaf7c6711b6d2a341a346eefd8cd81b972aaa15 100644 (file)
@@ -1026,7 +1026,7 @@ static const entity_ht *unescape_inverse_map(int all, int flags)
  * unicode code points */
 static entity_table_opt determine_entity_table(int all, int doctype)
 {
-       entity_table_opt retval = {NULL};
+       entity_table_opt retval = {0};
 
        assert(!(doctype == ENT_HTML_DOC_XML1 && all));