From d4964ec03671a98268fe897da1511292b2cf6719 Mon Sep 17 00:00:00 2001 From: kabeer khan Date: Fri, 30 Jan 2015 08:02:21 +0900 Subject: [PATCH] Elm_Entry: Removed empty line and added error message Summary: Resolved FIXME in utf8_markup_save by adding error messages for fopen and fputs command Signed-off-by: kabeer khan Reviewers: devilhorns, seoz Reviewed By: seoz Differential Revision: https://phab.enlightenment.org/D1888 --- src/lib/elm_entry.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c index dcf6f85..de9200a 100644 --- a/src/lib/elm_entry.c +++ b/src/lib/elm_entry.c @@ -207,18 +207,18 @@ _utf8_markup_save(const char *file, if ((!text) || (!text[0])) { ecore_file_unlink(file); - return; } f = fopen(file, "wb"); if (!f) { - // FIXME: report a write error + ERR("Failed to open %s for writing", file); return; } - fputs(text, f); // FIXME: catch error + if (fputs(text, f) == EOF) + ERR("Failed to write text to file %s", file); fclose(f); } -- 2.7.4