flock.c:90:23: warning: argument to 'sizeof' in 'memset' call is the
same expression as the destination; did you mean to dereference it?
[-Wsizeof-pointer-memaccess]
memset(sa, 0, sizeof sa);
~~ ^~
Reported-by: Francesco Cosoleto <cosoleto@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
static void setup_timer(struct itimerval *timer, struct itimerval *old_timer,
struct sigaction *sa, struct sigaction *old_sa)
{
- memset(sa, 0, sizeof sa);
+ memset(sa, 0, sizeof *sa);
sa->sa_handler = timeout_handler;
sa->sa_flags = SA_RESETHAND;
sigaction(SIGALRM, sa, old_sa);