From ce396b3ddbd18fb64aa96a07c07679df14efec66 Mon Sep 17 00:00:00 2001 From: TingPing Date: Fri, 12 Dec 2014 05:26:22 -0500 Subject: fishlim: Use standard keyfile save function --- plugins/fishlim/keystore.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/plugins/fishlim/keystore.c b/plugins/fishlim/keystore.c index 9f1c446e..45cca668 100644 --- a/plugins/fishlim/keystore.c +++ b/plugins/fishlim/keystore.c @@ -131,16 +131,11 @@ static bool delete_nick(GKeyFile *keyfile, const char *nick) { static bool save_keystore(GKeyFile *keyfile) { char *filename; bool ok; - // Serialize - gsize file_length; - gchar *file_data = g_key_file_to_data(keyfile, &file_length, NULL); - if (!file_data) return false; - - // Write to file + filename = get_config_filename(); - ok = g_file_set_contents(filename, file_data, file_length, NULL); - g_free(filename); - g_free(file_data); + ok = g_key_file_save_to_file (keyfile, filename, NULL); + g_free (filename); + return ok; } -- cgit 1.4.1