]> git.ipfire.org Git - thirdparty/glibc.git/commit
login: Remove double-assignment of fl.l_whence in try_file_lock
authorFlorian Weimer <fweimer@redhat.com>
Thu, 7 Nov 2019 08:53:41 +0000 (09:53 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Thu, 7 Nov 2019 08:54:33 +0000 (09:54 +0100)
commitb0a83ae71b2588bd2a9e6b40f95191602940e01e
tree3ca57316ab3aa9837d1d75ebd0c25c71dcbb4e15
parenta673c07af3bcfa24432c3fd8a1dea12f931ee903
login: Remove double-assignment of fl.l_whence in try_file_lock

Since l_whence is the second member of struct flock, it is written
twice.  The double-assignment is technically undefined behavior due to
the lack of a sequence point.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Change-Id: I2baf9e70690e723c61051b25ccbd510aec15976c
login/utmp_file.c