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:
Markus Armbruster 2013-01-11 11:24:58 +01:00 committed by Michael Roth
parent f5b7957878
commit 5d27f9ce3d
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}