From 1bbf82037795bb4ed2b2af21f2ae2e43d3e20f50 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 19 Jan 2012 19:30:31 +0100 Subject: flock: fix sizeof usage [clang -Wsizeof-pointer-memaccess] 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 Signed-off-by: Karel Zak --- sys-utils/flock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys-utils/flock.c') diff --git a/sys-utils/flock.c b/sys-utils/flock.c index 0d4a8fbf5..50cea1392 100644 --- a/sys-utils/flock.c +++ b/sys-utils/flock.c @@ -87,7 +87,7 @@ static void strtotimeval(const char *str, struct timeval *tv) 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); -- cgit v1.2.3-55-g7522