static const char *config_keys[] = {"DataDir", "StoreRates"};
static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
-static char *datadir = NULL;
-static int store_rates = 0;
-static int use_stdio = 0;
+static char *datadir;
+static int store_rates;
+static int use_stdio;
static int value_list_to_string(char *buffer, int buffer_len,
const data_set_t *ds, const value_list_t *vl) {
}
datadir = strdup(value);
if (datadir != NULL) {
- int len = strlen(datadir);
+ size_t len = strlen(datadir);
while ((len > 0) && (datadir[len - 1] == '/')) {
len--;
datadir[len] = '\0';
}
- if (len <= 0) {
+ if (len == 0) {
free(datadir);
datadir = NULL;
}