summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkabeer khan <kabeer.khan@samsung.com>2015-01-30 08:02:21 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2015-01-30 08:02:21 +0900
commitd4964ec03671a98268fe897da1511292b2cf6719 (patch)
treeec0c5fa196ff74452c07e1248c690a97c1030099
parent051fdcf0d208327dd0e1653ef4d3f96a252b8105 (diff)
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 <kabeer.khan@samsung.com> Reviewers: devilhorns, seoz Reviewed By: seoz Differential Revision: https://phab.enlightenment.org/D1888
-rw-r--r--src/lib/elm_entry.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index dcf6f85e5..de9200a2a 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -207,18 +207,18 @@ _utf8_markup_save(const char *file,
207 if ((!text) || (!text[0])) 207 if ((!text) || (!text[0]))
208 { 208 {
209 ecore_file_unlink(file); 209 ecore_file_unlink(file);
210
211 return; 210 return;
212 } 211 }
213 212
214 f = fopen(file, "wb"); 213 f = fopen(file, "wb");
215 if (!f) 214 if (!f)
216 { 215 {
217 // FIXME: report a write error 216 ERR("Failed to open %s for writing", file);
218 return; 217 return;
219 } 218 }
220 219
221 fputs(text, f); // FIXME: catch error 220 if (fputs(text, f) == EOF)
221 ERR("Failed to write text to file %s", file);
222 fclose(f); 222 fclose(f);
223} 223}
224 224