diff options
author | Simran Singhal <singhalsimran0@gmail.com> | 2020-04-01 22:23:14 +0530 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2020-05-04 14:43:22 +0200 |
commit | b3ac2b94cdc939a90d5a22338ae507689e2cfab0 (patch) | |
tree | 4586d31cee093411409945cdf2804f99ac93c5a2 /block/vhdx.c | |
parent | 949da1eb9db9df0d998ad2f3086979e4e23a44a1 (diff) |
Compress lines for immediate return
Compress two lines into a single line if immediate return statement is found.
It also remove variables progress, val, data, ret and sock
as they are no longer needed.
Remove space between function "mixer_load" and '(' to fix the
checkpatch.pl error:-
ERROR: space prohibited between function name and open parenthesis '('
Done using following coccinelle script:
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Simran Singhal <singhalsimran0@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20200401165314.GA3213@simran-Inspiron-5558>
[lv: in handle_aiocb_write_zeroes_unmap() move "int ret" inside the #ifdef]
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'block/vhdx.c')
-rw-r--r-- | block/vhdx.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/block/vhdx.c b/block/vhdx.c index 45be0a4321..aedd782604 100644 --- a/block/vhdx.c +++ b/block/vhdx.c @@ -411,8 +411,7 @@ int vhdx_update_headers(BlockDriverState *bs, BDRVVHDXState *s, if (ret < 0) { return ret; } - ret = vhdx_update_header(bs, s, generate_data_write_guid, log_guid); - return ret; + return vhdx_update_header(bs, s, generate_data_write_guid, log_guid); } /* opens the specified header block from the VHDX file header section */ |