projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
collectd.spec: add gps plugin
[collectd.git]
/
src
/
onewire.c
diff --git
a/src/onewire.c
b/src/onewire.c
index
3c441ec
..
235eff8
100644
(file)
--- a/
src/onewire.c
+++ b/
src/onewire.c
@@
-20,6
+20,7
@@
**/
#include "collectd.h"
**/
#include "collectd.h"
+
#include "common.h"
#include "plugin.h"
#include "utils_ignorelist.h"
#include "common.h"
#include "plugin.h"
#include "utils_ignorelist.h"
@@
-176,11
+177,11
@@
static int direct_list_insert(const char * config)
{
regmatch_t pmatch[3];
size_t nmatch = 3;
{
regmatch_t pmatch[3];
size_t nmatch = 3;
- direct_access_element_t *element
= NULL
;
+ direct_access_element_t *element;
DEBUG ("onewire plugin: direct_list_insert <%s>", config);
DEBUG ("onewire plugin: direct_list_insert <%s>", config);
- element =
(direct_access_element_t *) malloc (sizeof
(*element));
+ element =
malloc (sizeof
(*element));
if (element == NULL)
{
ERROR ("onewire plugin: direct_list_insert - cannot allocate element");
if (element == NULL)
{
ERROR ("onewire plugin: direct_list_insert - cannot allocate element");
@@
-338,7
+339,6
@@
static int cow_read_values (const char *path, const char *name,
value_t values[1];
value_list_t vl = VALUE_LIST_INIT;
int success = 0;
value_t values[1];
value_list_t vl = VALUE_LIST_INIT;
int success = 0;
- size_t i;
if (sensor_list != NULL)
{
if (sensor_list != NULL)
{
@@
-354,7
+354,7
@@
static int cow_read_values (const char *path, const char *name,
sstrncpy (vl.plugin, "onewire", sizeof (vl.plugin));
sstrncpy (vl.plugin_instance, name, sizeof (vl.plugin_instance));
sstrncpy (vl.plugin, "onewire", sizeof (vl.plugin));
sstrncpy (vl.plugin_instance, name, sizeof (vl.plugin_instance));
- for (i = 0; i < family_info->features_num; i++)
+ for (
size_t
i = 0; i < family_info->features_num; i++)
{
char *buffer;
size_t buffer_size;
{
char *buffer;
size_t buffer_size;