Elm_Entry: Removed empty line and added error message
authorkabeer khan <kabeer.khan@samsung.com>
Thu, 29 Jan 2015 23:02:21 +0000 (08:02 +0900)
committerDaniel Juyung Seo <seojuyung2@gmail.com>
Thu, 29 Jan 2015 23:02:21 +0000 (08:02 +0900)
Summary:
Resolved FIXME in utf8_markup_save by adding error messages
for fopen and fputs command

Signed-off-by: kabeer khan <kabeer.khan@samsung.com>
Reviewers: devilhorns, seoz

Reviewed By: seoz

Differential Revision: https://phab.enlightenment.org/D1888

src/lib/elm_entry.c

index dcf6f85..de9200a 100644 (file)
@@ -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);
 }