qemu-trivial.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-trivial] [PATCH] error.c: don't return value for void function
@ 2012-04-16  7:32 Amos Kong
  2012-04-16  8:58 ` Paolo Bonzini
  2012-04-16  9:43 ` Stefan Hajnoczi
  0 siblings, 2 replies; 3+ messages in thread
From: Amos Kong @ 2012-04-16  7:32 UTC (permalink / raw)
  To: qemu-trivial, qemu-devel, stefanha

It is invalid to return a value from a function
returning void.

Signed-off-by: Amos Kong <akong@redhat.com>
---
 error.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/error.c b/error.c
index d3455ab..a52b771 100644
--- a/error.c
+++ b/error.c
@@ -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)



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-trivial] [PATCH] error.c: don't return value for void function
  2012-04-16  7:32 [Qemu-trivial] [PATCH] error.c: don't return value for void function Amos Kong
@ 2012-04-16  8:58 ` Paolo Bonzini
  2012-04-16  9:43 ` Stefan Hajnoczi
  1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2012-04-16  8:58 UTC (permalink / raw)
  To: Amos Kong; +Cc: qemu-trivial, qemu-devel, stefanha

Il 16/04/2012 09:32, Amos Kong ha scritto:
> It is invalid to return a value from a function
> returning void.
> 
> Signed-off-by: Amos Kong <akong@redhat.com>
> ---
>  error.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/error.c b/error.c
> index d3455ab..a52b771 100644
> --- a/error.c
> +++ b/error.c
> @@ -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 <pbonzini@redhat.com>





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-trivial] [PATCH] error.c: don't return value for void function
  2012-04-16  7:32 [Qemu-trivial] [PATCH] error.c: don't return value for void function Amos Kong
  2012-04-16  8:58 ` Paolo Bonzini
@ 2012-04-16  9:43 ` Stefan Hajnoczi
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2012-04-16  9:43 UTC (permalink / raw)
  To: Amos Kong; +Cc: qemu-trivial, qemu-devel

On Mon, Apr 16, 2012 at 03:32:49PM +0800, Amos Kong wrote:
> It is invalid to return a value from a function
> returning void.
> 
> Signed-off-by: Amos Kong <akong@redhat.com>
> ---
>  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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-04-16  9:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-16  7:32 [Qemu-trivial] [PATCH] error.c: don't return value for void function Amos Kong
2012-04-16  8:58 ` Paolo Bonzini
2012-04-16  9:43 ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).