qemu-img: Check getchar() return value in read_password() for WIN32
commitfdcf6e65bce1f8972030fed7af5e8aa5f6ae92c6
authorChen Gang <gang.chen.5i5j@gmail.com>
Sun, 6 Jul 2014 08:43:33 +0000 (6 16:43 +0800)
committerMichael Tokarev <mjt@tls.msk.ru>
Fri, 8 Aug 2014 20:06:32 +0000 (9 00:06 +0400)
tree2a427119adb314059ea7447bd201d92411608286
parentf13bef9592ab1b03e715487a1a1b3f317f27463f
qemu-img: Check getchar() return value in read_password() for WIN32

getchar() is a standard c library function which may return with failure
(e.g. -1), so like another platforms, also need check it under WIN32.

And make the related code match current qemu code styles, too.

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
qemu-img.c