From 494e75eb0e47c3fce0db5f7675cb0ab10bf6671d Mon Sep 17 00:00:00 2001 From: Sebastian Dransfeld Date: Sat, 7 Dec 2013 14:17:33 +0100 Subject: [PATCH] eldbus: print error when fwrite fails Return value of fwrite should be checked. Fixes 1039715 --- src/bin/eldbus/utils.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bin/eldbus/utils.c b/src/bin/eldbus/utils.c index c0af73b..514c209 100644 --- a/src/bin/eldbus/utils.c +++ b/src/bin/eldbus/utils.c @@ -42,7 +42,10 @@ file_write(const char *file_name, const char *buffer) return EINA_FALSE; } - fwrite(buffer, strlen(buffer), 1, file_handler); + if (fwrite(buffer, strlen(buffer), 1, file_handler) < 1) + { + printf("Error writing to file: %s\n", file_name); + } fclose(file_handler); return EINA_TRUE; -- 2.7.4