aboutsummaryrefslogtreecommitdiff
path: root/timezone
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2024-11-16 16:51:31 +0100
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-11-25 16:45:59 -0300
commit53fcdf5f743aa9b02972eec658e66f96d6a63386 (patch)
treee1bd3ed90d89027abe4b8ba6f0dbffd833f08a9b /timezone
parent83d4b42ded712bbbc22ceeefe886b8315190da5b (diff)
downloadglibc-53fcdf5f743aa9b02972eec658e66f96d6a63386.tar.xz
glibc-53fcdf5f743aa9b02972eec658e66f96d6a63386.zip
Silence most -Wzero-as-null-pointer-constant diagnostics
Replace 0 by NULL and {0} by {}. Omit a few cases that aren't so trivial to fix. Link: <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117059> Link: <https://software.codidact.com/posts/292718/292759#answer-292759> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'timezone')
-rw-r--r--timezone/zic.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/timezone/zic.c b/timezone/zic.c
index cf8e79dff4..d5d30163b0 100644
--- a/timezone/zic.c
+++ b/timezone/zic.c
@@ -1950,7 +1950,7 @@ inzsub(char **fields, int nfields, bool iscont)
z.z_filenum = filenum;
z.z_linenum = linenum;
z.z_stdoff = gethms(fields[i_stdoff], _("invalid UT offset"));
- if ((cp = strchr(fields[i_format], '%')) != 0) {
+ if ((cp = strchr(fields[i_format], '%')) != NULL) {
if ((*++cp != 's' && *cp != 'z') || strchr(cp, '%')
|| strchr(fields[i_format], '/')) {
error(_("invalid abbreviation format"));
@@ -2238,9 +2238,9 @@ rulesub(struct rule *rp, const char *loyearp, const char *hiyearp,
rp->r_wday = lp->l_value;
rp->r_dayofmonth = len_months[1][rp->r_month];
} else {
- if ((ep = strchr(dp, '<')) != 0)
+ if ((ep = strchr(dp, '<')) != NULL)
rp->r_dycode = DC_DOWLEQ;
- else if ((ep = strchr(dp, '>')) != 0)
+ else if ((ep = strchr(dp, '>')) != NULL)
rp->r_dycode = DC_DOWGEQ;
else {
ep = dp;