diff options
author | Daniel Carl <danielcarl@gmx.de> | 2014-01-19 17:37:17 +0100 |
---|---|---|
committer | Daniel Carl <danielcarl@gmx.de> | 2014-01-19 17:37:17 +0100 |
commit | 5911734aedaec352eca81a6da24148587cb3103a (patch) | |
tree | 5a32b8438db036b0661553af56483a39834f3107 /src/util.c | |
parent | afcdae37b3184eac69de8f0871bae12131769608 (diff) |
Use message logging function instead of fprintf.
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -76,7 +76,7 @@ char *util_get_file_contents(const char *filename, gsize *length) if (!(g_file_test(filename, G_FILE_TEST_IS_REGULAR) && g_file_get_contents(filename, &content, length, &error)) ) { - fprintf(stderr, "Cannot open %s: %s\n", filename, error ? error->message : "file not found"); + g_warning("Cannot open %s: %s", filename, error ? error->message : "file not found"); g_clear_error(&error); } return content; @@ -268,7 +268,7 @@ gboolean util_create_tmp_file(const char *content, char **file) fp = g_file_open_tmp(PROJECT "-XXXXXX", file, NULL); if (fp == -1) { - fprintf(stderr, "Could not create temporary file %s", *file); + g_critical("Could not create temp file %s", *file); g_free(*file); return false; } @@ -280,7 +280,7 @@ gboolean util_create_tmp_file(const char *content, char **file) if (bytes < len) { close(fp); unlink(*file); - fprintf(stderr, "Could not write temporary file %s", *file); + g_critical("Could not write temp file %s", *file); g_free(*file); return false; |