summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
inline | side by side (from parent 1:
7066fd4)
Its backend, input_module.cleanup(), is now also a void function.
SR_API struct sr_dev_inst *sr_input_dev_inst_get(const struct sr_input *in);
SR_API int sr_input_send(const struct sr_input *in, GString *buf);
SR_API int sr_input_end(const struct sr_input *in);
SR_API struct sr_dev_inst *sr_input_dev_inst_get(const struct sr_input *in);
SR_API int sr_input_send(const struct sr_input *in, GString *buf);
SR_API int sr_input_end(const struct sr_input *in);
-SR_API int sr_input_free(const struct sr_input *in);
+SR_API void sr_input_free(const struct sr_input *in);
/*--- output/output.c -------------------------------------------------------*/
/*--- output/output.c -------------------------------------------------------*/
-static int cleanup(struct sr_input *in)
+static void cleanup(struct sr_input *in)
if (inc->sample_buffer)
g_free(inc->sample_buffer);
if (inc->sample_buffer)
g_free(inc->sample_buffer);
}
static struct sr_option options[] = {
}
static struct sr_option options[] = {
-SR_API int sr_input_free(const struct sr_input *in)
+SR_API void sr_input_free(const struct sr_input *in)
- ret = in->module->cleanup((struct sr_input *)in);
+ in->module->cleanup((struct sr_input *)in);
if (in->sdi)
sr_dev_inst_free(in->sdi);
if (in->buf->len > 64) {
/* That seems more than just some sub-unitsize leftover... */
sr_warn("Found %d unprocessed bytes at free time.", in->buf->len);
}
if (in->sdi)
sr_dev_inst_free(in->sdi);
if (in->buf->len > 64) {
/* That seems more than just some sub-unitsize leftover... */
sr_warn("Found %d unprocessed bytes at free time.", in->buf->len);
}
- if (in->buf)
- g_string_free(in->buf, TRUE);
+ g_string_free(in->buf, TRUE);
g_free(in->priv);
g_free((gpointer)in);
g_free(in->priv);
g_free((gpointer)in);
-static int cleanup(struct sr_input *in)
+static void cleanup(struct sr_input *in)
{
struct context *inc;
inc = in->priv;
g_slist_free_full(inc->channels, free_channel);
{
struct context *inc;
inc = in->priv;
g_slist_free_full(inc->channels, free_channel);
}
static struct sr_option options[] = {
}
static struct sr_option options[] = {
* @retval SR_OK Success
* @retval other Negative error code.
*/
* @retval SR_OK Success
* @retval other Negative error code.
*/
- int (*cleanup) (struct sr_input *in);
+ void (*cleanup) (struct sr_input *in);
};
/** Output module instance. */
};
/** Output module instance. */