]> sigrok.org Git - libsigrok.git/commitdiff
sr: Make wrappers honor return values.
authorUwe Hermann <redacted>
Wed, 28 Mar 2012 16:52:17 +0000 (18:52 +0200)
committerUwe Hermann <redacted>
Sat, 31 Mar 2012 09:04:02 +0000 (11:04 +0200)
hwdriver.c
sigrok-internal.h

index cbe3f23610d881a43ad324562bb6551b60d079b2..82dcb2b3036cf410f72c778e54e1d4a0d23a1fef 100644 (file)
@@ -307,15 +307,15 @@ SR_API struct sr_hwcap_option *sr_hw_hwcap_get(int hwcap)
        return NULL;
 }
 
-/* unnecessary level of indirection follows. */
+/* Unnecessary level of indirection follows. */
 
-SR_PRIV void sr_source_remove(int fd)
+SR_PRIV int sr_source_remove(int fd)
 {
-       sr_session_source_remove(fd);
+       return sr_session_source_remove(fd);
 }
 
-SR_PRIV void sr_source_add(int fd, int events, int timeout,
-                  sr_receive_data_callback_t cb, void *cb_data)
+SR_PRIV int sr_source_add(int fd, int events, int timeout,
+                         sr_receive_data_callback_t cb, void *cb_data)
 {
-       sr_session_source_add(fd, events, timeout, cb, cb_data);
+       return sr_session_source_add(fd, events, timeout, cb, cb_data);
 }
index 6f1480237a81687baaaf639381ad1de0bfd5a57f..d79be5f92df70ce0d2ec4f28e28ee5c2b6b16886 100644 (file)
@@ -91,9 +91,9 @@ SR_PRIV struct sr_dev_inst *sr_dev_inst_new(int index, int status,
 SR_PRIV struct sr_dev_inst *sr_dev_inst_get(GSList *dev_insts, int dev_index);
 SR_PRIV void sr_dev_inst_free(struct sr_dev_inst *sdi);
 
-SR_PRIV void sr_source_remove(int fd);
-SR_PRIV void sr_source_add(int fd, int events, int timeout,
-                          sr_receive_data_callback_t cb, void *cb_data);
+SR_PRIV int sr_source_remove(int fd);
+SR_PRIV int sr_source_add(int fd, int events, int timeout,
+                         sr_receive_data_callback_t cb, void *cb_data);
 
 /*--- hardware/common/serial.c ----------------------------------------------*/