error.c: don't return value for void function
PATCH 1/1 error.c: don't return value for void function
It is invalid to return a value from a function
returning void.
Signed-off-by Amos Kong <[email protected]>
--- error.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
error.c +1 -1
@@ -93,7 +93,7 @@ QDict *error_get_data(Error *err)void error_set_field (Error *err,const char *field,const char *value) {QDict *dict =qdict_get_qdict (err->obj,"data" ); -return qdict_put (dict, field,qstring_from_str (value)); +qdict_put (dict, field,qstring_from_str (value)); }void error_free (Error *err)
Il 16/04/2012 09:32, Amos Kong ha scritto:
Quoted 13 lines
It is invalid to return a value from a function
returning void.Signed-off-by Amos Kong <[email protected]>--- error.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)error.c +0
-0
error.c QDict *error_get_data(Error *err) · line 99
Quoted 8 lines
error.c +1
-1@@ -93,7 +93,7 @@ QDict *error_get_data(Error *err)void error_set_field (Error *err,const char *field,const char *value) {QDict *dict =qdict_get_qdict (err->obj,"data" ); -return qdict_put (dict, field,qstring_from_str (value)); +qdict_put (dict, field,qstring_from_str (value)); }void error_free (Error *err)
Reviewed-by Paolo Bonzini <[email protected]>
Stefan Hajnoczi
AppliedQuoted 7 lines · Amos Kong
It is invalid to return a value from a function
returning void.Signed-off-by Amos Kong <[email protected]>--- error.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches
Stefan