projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sigrok plugin: constify
[collectd.git]
/
src
/
sigrok.c
diff --git
a/src/sigrok.c
b/src/sigrok.c
index
eecb54c
..
ad5c70c
100644
(file)
--- a/
src/sigrok.c
+++ b/
src/sigrok.c
@@
-136,9
+136,9
@@
static int sigrok_config(oconfig_item_t *ci)
return 0;
}
return 0;
}
-static char *sigrok_value_type(const struct sr_datafeed_analog *analog)
+static c
onst c
har *sigrok_value_type(const struct sr_datafeed_analog *analog)
{
{
- char *s;
+ c
onst c
har *s;
if (analog->mq == SR_MQ_VOLTAGE)
s = "voltage";
if (analog->mq == SR_MQ_VOLTAGE)
s = "voltage";
@@
-360,10
+360,13
@@
static int sigrok_init(void)
return -1;
}
return -1;
}
- if ((status = plugin_thread_create(&sr_thread, NULL, sigrok_read_thread,
- NULL)) != 0) {
+ status = plugin_thread_create(&sr_thread, NULL, sigrok_read_thread,
+ NULL);
+ if (status != 0)
+ {
+ char errbuf[1024];
ERROR("sigrok plugin: Failed to create thread: %s.",
ERROR("sigrok plugin: Failed to create thread: %s.",
- s
trerror(status
));
+ s
strerror (errno, errbuf, sizeof (errbuf)
));
return -1;
}
sr_thread_running = TRUE;
return -1;
}
sr_thread_running = TRUE;