diff options
author | Karel Zak | 2012-01-19 19:30:31 +0100 |
---|---|---|
committer | Karel Zak | 2012-01-19 19:30:31 +0100 |
commit | 1bbf82037795bb4ed2b2af21f2ae2e43d3e20f50 (patch) | |
tree | 7bb0c239a1c8701221f44301b4358e2ceb6016a9 /sys-utils/flock.c | |
parent | build-sys: improve ko-release-* scripts (diff) | |
download | kernel-qcow2-util-linux-1bbf82037795bb4ed2b2af21f2ae2e43d3e20f50.tar.gz kernel-qcow2-util-linux-1bbf82037795bb4ed2b2af21f2ae2e43d3e20f50.tar.xz kernel-qcow2-util-linux-1bbf82037795bb4ed2b2af21f2ae2e43d3e20f50.zip |
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 <cosoleto@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/flock.c')
-rw-r--r-- | sys-utils/flock.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |