From 4b5a27ef9aa40fa6f0c50c5e49b704b4649136a2 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 22 Mar 2023 10:59:12 -0700 Subject: [PROPOSED 1/2] Port to C23 + !setenv + !localtime_rz Problem reported privately by panic (2023-03-22). * zdump.c (tzalloc): Fix misspelling typos in code that is compiled when not using localtime_rz (e.g., when not linking with tzcode and not on NetBSD), and setenv is missing, and the compiler supports C23 or later. --- zdump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zdump.c b/zdump.c index 88bcd3a3..6f9573ec 100644 --- a/zdump.c +++ b/zdump.c @@ -273,8 +273,8 @@ tzalloc(char const *val) while (*e++) { # ifdef ckd_add - if (ckd_add(&initial_nenvptrs, initial_envptrs, 1) - || INDEX_MAX < initial_envptrs) + if (ckd_add(&initial_nenvptrs, initial_nenvptrs, 1) + || INDEX_MAX < initial_nenvptrs) size_overflow(); # else if (initial_nenvptrs == INDEX_MAX / sizeof *environ) -- 2.37.2