summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-02-16 13:31:41 +0100
committerHaru <haru@dotalux.com>2016-02-17 10:40:43 +0100
commit5b673efa121320d1575e126243fa2c7ec460952d (patch)
tree609fa0a08bf4065a07ccb469039df43e96d095ee /src/map/status.c
parent6c127b3ec4f73f02aff5b37e9526dcc249d95c54 (diff)
downloadhercules-5b673efa121320d1575e126243fa2c7ec460952d.tar.gz
hercules-5b673efa121320d1575e126243fa2c7ec460952d.tar.bz2
hercules-5b673efa121320d1575e126243fa2c7ec460952d.tar.xz
hercules-5b673efa121320d1575e126243fa2c7ec460952d.zip
Renamed config->read_file to config->load_file
- The return value is now consistent with the libconfig standard (CONFIG_TRUE/CONFIG_FALSE). - Removed some redundant error messages. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 26db1750b..32f7bc2d8 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -12770,10 +12770,9 @@ void status_read_job_db(void) { /* [malufett/Hercules] */
const char *config_filename = "db/pre-re/job_db.conf";
#endif
- if ( libconfig->read_file(&job_db_conf, config_filename) ) {
- ShowError("can't read %s\n", config_filename);
+ if (!libconfig->load_file(&job_db_conf, config_filename))
return;
- }
+
while ( (jdb = libconfig->setting_get_elem(job_db_conf.root, i++)) ) {
int class_, idx;
const char *name = config_setting_name(jdb);
@@ -12932,11 +12931,10 @@ int status_readdb_refine_libconfig(const char *filename) {
int i = 0, count = 0,type = 0;
sprintf(filepath, "%s/%s", map->db_path, filename);
- memset(&duplicate,0,sizeof(duplicate));
- if( libconfig->read_file(&refine_db_conf, filepath) ) {
- ShowError("can't read %s\n", filepath);
+ if (!libconfig->load_file(&refine_db_conf, filepath))
return 0;
- }
+
+ memset(&duplicate,0,sizeof(duplicate));
while((r = libconfig->setting_get_elem(refine_db_conf.root,i++))) {
char *name = config_setting_name(r);