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

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).