Many bugfixes - fixed warnings and compile errors

This commit is contained in:
2017-08-27 17:08:16 +02:00
parent eca544a421
commit a518a69d9a
6 changed files with 32 additions and 16 deletions

View File

@@ -3,6 +3,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
config_t cfg;
const config_setting_t *pins;
@@ -60,7 +61,7 @@ int cfgreadsensornodes(sensornode *nodes, int nodecount) {
if (!config_setting_lookup_string(sensornodesetting, "ip", &ip))
continue;
currentNode->ip = ip;
strcpy(currentNode->ip, ip);
//if (i < count - 1) { //stop at last item
currentNode->next = malloc(sizeof(sensornode));
currentNode = currentNode->next;
@@ -70,5 +71,5 @@ int cfgreadsensornodes(sensornode *nodes, int nodecount) {
return 1;
}
return 0;
}