keyfile = g_key_file_new();
if (!g_key_file_load_from_file(keyfile, path, 0, &error)) {
- STC_LOGD("Unable to load [%s] : %s", path, error->message);
- g_clear_error(&error);
- g_key_file_free(keyfile);
- keyfile = NULL;
+ STC_LOGD("Unable to load [%s] : %s", path, error->message); //LCOV_EXCL_LINE
+ g_clear_error(&error); //LCOV_EXCL_LINE
+ g_key_file_free(keyfile); //LCOV_EXCL_LINE
+ keyfile = NULL; //LCOV_EXCL_LINE
}
return keyfile;
data = g_key_file_to_data(keyfile, &length, NULL);
if (!g_file_set_contents(path, data, length, &error)) {
- STC_LOGD("Failed to save information : %s", error->message);
- g_error_free(error);
- ret = -EIO;
+ STC_LOGD("Failed to save information : %s", error->message); //LCOV_EXCL_LINE
+ g_error_free(error); //LCOV_EXCL_LINE
+ ret = -EIO; //LCOV_EXCL_LINE
}
__sync_file_to_disk(path);
return ret;
}
+//LCOV_EXCL_START
gboolean stc_util_get_config_bool(char *key)
{
char path[MAX_PATH_LENGTH];
return value;
}
+//LCOV_EXCL_STOP
int stc_util_get_config_int(char *key)
{
keyfile = __load_key_file(path);
if (!keyfile)
- keyfile = g_key_file_new();
+ keyfile = g_key_file_new(); //LCOV_EXCL_LINE
value = g_key_file_get_integer(keyfile, path, key, NULL);
return value;
}
+//LCOV_EXCL_START
API void stc_util_set_debuglog(int debuglog)
{
g_debuglog = debuglog;
}
+//LCOV_EXCL_STOP
API int stc_util_get_debuglog(void)
{
keyfile = __load_key_file(path);
if (!keyfile)
- keyfile = g_key_file_new();
+ keyfile = g_key_file_new(); //LCOV_EXCL_LINE
g_key_file_set_integer(keyfile, path, INFO_DEBUGLOG, 0);