diff options
author | Timo Sirainen <cras@irssi.org> | 2000-04-14 12:49:02 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-04-14 12:49:02 +0000 |
commit | 4482d518b85f395101085c74b00feee9ca678c5a (patch) | |
tree | 5a9d32fa209c071e40833e03469674362714722f /src/lib-config/get.c | |
parent | 53b248f6deafb553aae133792659a8412bc00925 (diff) | |
download | irssi-4482d518b85f395101085c74b00feee9ca678c5a.zip |
section can be NULL - which is same as "". Fixed several functions to allow
it.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@164 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/lib-config/get.c')
-rw-r--r-- | src/lib-config/get.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib-config/get.c b/src/lib-config/get.c index e29df699..b5c3f42e 100644 --- a/src/lib-config/get.c +++ b/src/lib-config/get.c @@ -107,11 +107,10 @@ char *config_get_str(CONFIG_REC *rec, const char *section, const char *key, cons char *path; g_return_val_if_fail(rec != NULL, (char *) def); - g_return_val_if_fail(section != NULL, (char *) def); g_return_val_if_fail(key != NULL, (char *) def); /* check if it already exists in cache */ - path = g_strconcat(section, "/", key, NULL); + path = g_strconcat(section == NULL ? "" : section, "/", key, NULL); node = g_hash_table_lookup(rec->cache, path); if (node != NULL) @@ -168,7 +167,6 @@ CONFIG_NODE *config_list_find_node(CONFIG_REC *rec, const char *section, const c GSList *tmp; g_return_val_if_fail(rec != NULL, NULL); - g_return_val_if_fail(section != NULL, NULL); g_return_val_if_fail(key != NULL, NULL); g_return_val_if_fail(value_key != NULL, NULL); |