From: Uwe Hermann Date: Wed, 28 Mar 2012 16:52:17 +0000 (+0200) Subject: sr: Make wrappers honor return values. X-Git-Tag: libsigrok-0.1.0~16 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=69cfcfc8f0f3f4358714d706268fc05aaa70ca23;p=libsigrok.git sr: Make wrappers honor return values. --- diff --git a/hwdriver.c b/hwdriver.c index cbe3f236..82dcb2b3 100644 --- a/hwdriver.c +++ b/hwdriver.c @@ -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); } diff --git a/sigrok-internal.h b/sigrok-internal.h index 6f148023..d79be5f9 100644 --- a/sigrok-internal.h +++ b/sigrok-internal.h @@ -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 ----------------------------------------------*/