summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shared/configparser.c2
-rw-r--r--shared/configparser.h10
2 files changed, 6 insertions, 6 deletions
diff --git a/shared/configparser.c b/shared/configparser.c
index c48fe4c..3deb89d 100644
--- a/shared/configparser.c
+++ b/shared/configparser.c
@@ -53,7 +53,7 @@ handle_key(const struct config_key *key, const char *value)
*(char **)key->data = s;
return 0;
- case CONFIG_KEY_BOOL:
+ case CONFIG_KEY_BOOLEAN:
if (strcmp(value, "false\n") == 0)
*(int *)key->data = 0;
else if (strcmp(value, "true\n") == 0)
diff --git a/shared/configparser.h b/shared/configparser.h
index 93b335c..34f5c31 100644
--- a/shared/configparser.h
+++ b/shared/configparser.h
@@ -23,15 +23,15 @@
#ifndef CONFIGPARSER_H
#define CONFIGPARSER_H
-enum {
- CONFIG_KEY_INTEGER,
- CONFIG_KEY_STRING,
- CONFIG_KEY_BOOL
+enum config_key_type {
+ CONFIG_KEY_INTEGER, /* typeof data = int */
+ CONFIG_KEY_STRING, /* typeof data = char* */
+ CONFIG_KEY_BOOLEAN /* typeof data = int */
};
struct config_key {
const char *name;
- int type;
+ enum config_key_type type;
void *data;
};