This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] settimeofday with NULL tv
- From: David Miller <davem at davemloft dot net>
- To: law at redhat dot com
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 03 Dec 2012 14:13:30 -0500 (EST)
- Subject: Re: [PATCH] settimeofday with NULL tv
- References: <50BCF7A8.9060300@redhat.com>
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.