# HG changeset patch # User Michael Shkutkov # Date 1182463673 0 # Node ID 038c14fcadb866b4777182b8a9d1046753da9a9c # Parent bb228f608b61cc35099834d4101ec644d1c12351 setting error to NULL before using diff -r bb228f608b61 -r 038c14fcadb8 libpurple/plugins/log_reader.c --- a/libpurple/plugins/log_reader.c Thu Jun 21 22:03:51 2007 +0000 +++ b/libpurple/plugins/log_reader.c Thu Jun 21 22:07:53 2007 +0000 @@ -1813,6 +1813,7 @@ purple_debug(PURPLE_DEBUG_INFO, "QIP logger list", "Reading %s\n", path); + error = NULL: if (!g_file_get_contents(path, &contents, &length, &error)) if (error) { purple_debug(PURPLE_DEBUG_ERROR, "QIP logger list", @@ -1829,6 +1830,7 @@ "File %s is found\n", filename); /* We should convert file contents from Cp1251 to UTF-8 codeset */ + error = NULL; if (!(utf8_string = g_convert(contents, length, "UTF-8", "Cp1251", NULL, NULL, &error))) { if (error) { purple_debug(PURPLE_DEBUG_ERROR, "QIP logger list", @@ -1935,6 +1937,7 @@ purple_debug(PURPLE_DEBUG_INFO, "QIP logger read", "Reading %s\n", data->path); + error = NULL; if (!g_file_get_contents(data->path, &contents, &length, &error)) if (error) { purple_debug(PURPLE_DEBUG_ERROR, "QIP logger list", @@ -1946,6 +1949,7 @@ gchar * utf8_string; /* We should convert file contents from Cp1251 to UTF-8 codeset */ + error = NULL; if (!(utf8_string = g_convert (contents, length, "UTF-8", "Cp1251", NULL, NULL, &error))) { if (error) { purple_debug(PURPLE_DEBUG_ERROR, "QIP logger read", @@ -2265,6 +2269,8 @@ purple_debug(PURPLE_DEBUG_INFO, "Trillian talk.ini read", "Reading %s\n", path); + + error = NULL; if (!g_key_file_load_from_file(key_file, path, G_KEY_FILE_NONE, GError &error)) { purple_debug(PURPLE_DEBUG_ERROR, "Trillian talk.ini read", "Error reading talk.ini\n");