Skip to contentSkip to conversation

block/win32: fix 'ret not initialized' warning

PATCH Applied Gerd Hoffmann 4 participants 4 messages May 16, 2017 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block/win32: fix 'ret not initialized' warning

---
 block/file-win32.c | 1 +
 1 file changed, 1 insertion(+)
block/file-win32.c +1 -0
index 1a35dbabf2..8f14f0bdcd 100644
@@ -346,6 +346,7 @@ static int raw_open(BlockDriverState *bs, QDict *options, int flags,
 
     if (qdict_get_try_bool(options, "locking", false)) {
         error_setg(errp, "locking=on is not supported on Windows");
+        ret = -EINVAL;
         goto fail;
     }
 
Signature · 1 line
2.9.3
Reviewed-by on v1 1/1
#1 lore raw

Am 16.05.2017 um 09:42 schrieb Gerd Hoffmann:

Quoted 10 lines
---
 block/file-win32.c | 1 +
 1 file changed, 1 insertion(+)
block/file-win32.c +0 -0
index 1a35dbabf2..8f14f0bdcd 100644

block/file-win32.c static int raw_open(BlockDriverState *bs, QDict *options, int flags, · line 351

Quoted 6 lines
block/file-win32.c +1 -0
@@ -346,6 +346,7 @@ static int raw_open(BlockDriverState *bs, QDict *options, int flags,
 
     if (qdict_get_try_bool(options, "locking", false)) {
         error_setg(errp, "locking=on is not supported on Windows");
+        ret = -EINVAL;
         goto fail;
     }

This is a bug fix for commit 1c3a555c.

Reviewed-by
#2 lore raw
Quoted 21 lines · Stefan Weil

Am 16.05.2017 um 09:42 schrieb Gerd Hoffmann:

Quoted 10 lines
---
 block/file-win32.c | 1 +
 1 file changed, 1 insertion(+)
block/file-win32.c +0 -0
index 1a35dbabf2..8f14f0bdcd 100644

block/file-win32.c static int raw_open(BlockDriverState *bs, QDict *options, int flags, · line 351

Quoted 6 lines
block/file-win32.c +1 -0
@@ -346,6 +346,7 @@ static int raw_open(BlockDriverState *bs, QDict *options, int flags,
 
     if (qdict_get_try_bool(options, "locking", false)) {
         error_setg(errp, "locking=on is not supported on Windows");
+        ret = -EINVAL;
         goto fail;
     }

This is a bug fix for commit 1c3a555c.

Quoted 3 lines

Thank you!