Drop unused parameter
value_node_add() ignores it's first argument - let's drop it to make
code more compact.
Change-Id: I17c2fed4049e1c83307feda001aefc006dfbe6a3
diff --git a/src/osysmon_file.c b/src/osysmon_file.c
index 3a228fa..1dec3db 100644
--- a/src/osysmon_file.c
+++ b/src/osysmon_file.c
@@ -82,19 +82,19 @@
f = fopen(of->cfg.path, "r");
if (!f) {
- value_node_add(parent, parent, of->cfg.name, "<NOTFOUND>");
+ value_node_add(parent, of->cfg.name, "<NOTFOUND>");
return;
}
s = fgets(buf, sizeof(buf), f);
fclose(f);
if (s == NULL) {
- value_node_add(parent, parent, of->cfg.name, "<EMPTY>");
+ value_node_add(parent, of->cfg.name, "<EMPTY>");
return;
}
buf[sizeof(buf)-1] = '\0';
while ((nl = strrchr(buf, '\n')))
*nl = '\0';
- value_node_add(parent, parent, of->cfg.name, buf);
+ value_node_add(parent, of->cfg.name, buf);
}
/***********************************************************************
@@ -153,7 +153,7 @@
struct value_node *vn_file;
struct osysmon_file *of;
- vn_file = value_node_add(parent, parent, "file", NULL);
+ vn_file = value_node_add(parent, "file", NULL);
llist_for_each_entry(of, &g_oss->files, list)
osysmon_file_read(of, vn_file);