[easytag] Do not close the log file iostream explicitly
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag] Do not close the log file iostream explicitly
- Date: Sat, 11 May 2013 09:29:36 +0000 (UTC)
commit 2d9cd3a106141ef58367be524dff0fcaea52547d
Author: David King <amigadave amigadave com>
Date: Sat May 11 10:28:23 2013 +0100
Do not close the log file iostream explicitly
The stream is automatically closed when the last reference is dropped,
so there is little benefit in explicitly closing it.
src/log.c | 11 -----------
1 files changed, 0 insertions(+), 11 deletions(-)
---
diff --git a/src/log.c b/src/log.c
index 24900c6..de2943d 100644
--- a/src/log.c
+++ b/src/log.c
@@ -358,9 +358,6 @@ void Log_Print (Log_Error_Type error_type, gchar const *format, ...)
g_error_free (error);
- /* Ignore errors. */
- g_output_stream_close (G_OUTPUT_STREAM (file_ostream), NULL, NULL);
-
g_string_free (data, TRUE);
g_object_unref (file_ostream);
g_object_unref (file);
@@ -370,14 +367,6 @@ void Log_Print (Log_Error_Type error_type, gchar const *format, ...)
first_time = FALSE;
- if (!g_output_stream_close (G_OUTPUT_STREAM (file_ostream), NULL,
- &error))
- {
- g_warning ("Error closing output stream of file '%s' ('%s')",
- file_path, error->message);
- g_error_free (error);
- }
-
g_string_free (data, TRUE);
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]