qemu-nbd: fix indentation and coding style

Signed-off-by: Peter Lieven <pl@kamp.de>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Benoit Canet <benoit.canet@nodalink.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
Peter Lieven 2014-08-13 19:20:19 +02:00 committed by Stefan Hajnoczi
parent b3838a4088
commit 713cc671f1

View file

@ -546,15 +546,18 @@ int main(int argc, char **argv)
break;
case 'P':
partition = strtol(optarg, &end, 0);
if (*end)
if (*end) {
errx(EXIT_FAILURE, "Invalid partition `%s'", optarg);
if (partition < 1 || partition > 8)
}
if (partition < 1 || partition > 8) {
errx(EXIT_FAILURE, "Invalid partition %d", partition);
}
break;
case 'k':
sockpath = optarg;
if (sockpath[0] != '/')
if (sockpath[0] != '/') {
errx(EXIT_FAILURE, "socket path must be absolute\n");
}
break;
case 'd':
disconnect = true;