[Spice-devel] [PATCH 7/7] reds: Report an error when reds_char_device_add_state fails
Christophe Fergeau
cfergeau at redhat.com
Wed Sep 12 07:18:01 PDT 2012
This used to abort with spice_error. The caller currently does
not check spice_server_char_device_add_interface return value, but
it's still cleaner to report an error in this case.
---
server/reds.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/server/reds.c b/server/reds.c
index 3ed8c67..d071a6d 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -3728,6 +3728,7 @@ static int spice_server_char_device_add_interface(SpiceServer *s,
reds_char_device_add_state(char_device->st);
} else {
spice_warning("failed to create device state for %s", char_device->subtype);
+ return -1;
}
return 0;
}
--
1.7.11.4
More information about the Spice-devel
mailing list