[PATCH] settimeofday with NULL tv
David Miller
davem@davemloft.net
Mon Dec 3 19:13:00 GMT 2012
From: Jeff Law <law@redhat.com>
Date: Mon, 03 Dec 2012 12:04:08 -0700
>
> settimeofday (NULL, tz) is used by systemd (and perhaps other code) to
> change the kernel timezone. Unfortunately, glibc marks the first
> argument as must-be-nonnull. This causes static analyzers to issue
> incorrect diagnostics for such uses of settimeofday.
>
> This patch removes the __nonnull attribute and the bogus diagnostics
> no longer are issued.
This looks fine to me.
More information about the Libc-alpha
mailing list