]> git.proxmox.com Git - mirror_qemu.git/commit - qemu-io-cmds.c
qemu-io: Use getopt() correctly
authorEric Blake <eblake@redhat.com>
Tue, 12 May 2015 15:10:56 +0000 (09:10 -0600)
committerKevin Wolf <kwolf@redhat.com>
Fri, 22 May 2015 15:08:01 +0000 (17:08 +0200)
commitb062ad86dcd33ab39be5060b0655d8e13834b167
tree60f38226e95d0855988d954705a150948eb6750b
parentd1b4efe5c4088fd2289e39b95bbdf73b3dcb7432
qemu-io: Use getopt() correctly

POSIX says getopt() returns -1 on completion.  While Linux happens
to define EOF as -1, this definition is not required by POSIX, and
there may be platforms where checking for EOF instead of -1 would
lead to an infinite loop.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qemu-io-cmds.c
qemu-io.c