Made the utility library more consistent with the core library

This commit is contained in:
jpekkila
2019-10-01 15:45:56 +03:00
parent 19b16eecc8
commit 20c2069231
2 changed files with 5 additions and 5 deletions

View File

@@ -109,12 +109,12 @@ update_config(AcMeshInfo* config)
/** /**
\brief Loads data from astaroth.conf into a config struct. \brief Loads data from astaroth.conf into a config struct.
\return 0 on success, -1 if there are potentially uninitialized values. \return AC_SUCCESS on success, AC_FAILURE if there are potentially uninitialized values.
*/ */
int AcResult
acLoadConfig(const char* config_path, AcMeshInfo* config) acLoadConfig(const char* config_path, AcMeshInfo* config)
{ {
int retval = 0; int retval = AC_SUCCESS;
assert(config_path); assert(config_path);
// memset reads the second parameter as a byte even though it says int in // memset reads the second parameter as a byte even though it says int in
@@ -136,7 +136,7 @@ acLoadConfig(const char* config_path, AcMeshInfo* config)
if (((uint32_t*)config)[i] == (uint32_t)0xFFFFFFFF) { if (((uint32_t*)config)[i] == (uint32_t)0xFFFFFFFF) {
fprintf(stderr, "Some config values may be uninitialized. " fprintf(stderr, "Some config values may be uninitialized. "
"See that all are defined in astaroth.conf\n"); "See that all are defined in astaroth.conf\n");
retval = -1; retval = AC_FAILURE;
} }
} }
return retval; return retval;

View File

@@ -30,7 +30,7 @@ extern "C" {
#endif #endif
/** Loads data from the config file */ /** Loads data from the config file */
int acLoadConfig(const char* config_path, AcMeshInfo* config); AcResult acLoadConfig(const char* config_path, AcMeshInfo* config);
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"