diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-12-10 12:51:30 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-12-10 12:51:30 -0500 |
commit | 0627d1f093db4064c114e8fb2a2a8e824fb606bb (patch) | |
tree | fa2db4b4b298d004d0041dff3e971aa3ca9c61cf /config.c | |
parent | c9ed1675a99a2a10eebbc2acd046aeb0e3e9fa77 (diff) | |
download | spmc-0627d1f093db4064c114e8fb2a2a8e824fb606bb.tar.gz |
Configuration++
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -154,6 +154,9 @@ void config_free(ConfigItem **item) { /// \param key search for key in config records /// \return success=pointer to record, failure=NULL ConfigItem *config_get(ConfigItem **item, const char *key) { + if (!item) { + return NULL; + } for (int i = 0; item[i] != NULL; i++) { if (!strcmp(item[i]->key, key)) { return item[i]; |