qemu-ga: Drop pointless lseek() from ga_open_pidfile()
After open(), the file offset is already zero, and neither lockf() nor ftruncate() change it. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
This commit is contained in:
parent
f5b7957878
commit
5d27f9ce3d
@ -289,7 +289,7 @@ static bool ga_open_pidfile(const char *pidfile)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ftruncate(pidfd, 0) || lseek(pidfd, 0, SEEK_SET)) {
|
||||
if (ftruncate(pidfd, 0)) {
|
||||
g_critical("Failed to truncate pid file");
|
||||
goto fail;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user