summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2016-10-05 14:47:11 +0200
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2016-10-07 11:54:23 +0200
commitbc9422cf0fa39b39c17a13284b461fd5c8b66ac6 (patch)
tree95642f2e170bec286ce57f06a3e495b3b03c5d3a
parentcf89ff3f457cd0bef417dd1a1406fd2699626b5e (diff)
eolian gen2: remove the unused append mode for file write
-rw-r--r--src/bin/eolian2/main.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/bin/eolian2/main.c b/src/bin/eolian2/main.c
index c62bade7cc..68b7896077 100644
--- a/src/bin/eolian2/main.c
+++ b/src/bin/eolian2/main.c
@@ -155,9 +155,9 @@ _get_filename(const char *path)
155} 155}
156 156
157static Eina_Bool 157static Eina_Bool
158_write_file(const char *fname, const Eina_Strbuf *buf, Eina_Bool append) 158_write_file(const char *fname, const Eina_Strbuf *buf)
159{ 159{
160 FILE *f = fopen(fname, append ? "ab" : "wb"); 160 FILE *f = fopen(fname, "wb");
161 if (!f) 161 if (!f)
162 { 162 {
163 fprintf(stderr, "eolian: could not open '%s' (%s)\n", 163 fprintf(stderr, "eolian: could not open '%s' (%s)\n",
@@ -297,7 +297,7 @@ _write_header(const char *ofname, const char *ifname, Eina_Bool legacy)
297 if (cl || !legacy) 297 if (cl || !legacy)
298 { 298 {
299 buf = _include_guard(_get_filename(ofname), NULL, buf); 299 buf = _include_guard(_get_filename(ofname), NULL, buf);
300 if (_write_file(ofname, buf, EINA_FALSE)) 300 if (_write_file(ofname, buf))
301 { 301 {
302 eina_strbuf_free(buf); 302 eina_strbuf_free(buf);
303 return EINA_TRUE; 303 return EINA_TRUE;
@@ -326,7 +326,7 @@ _write_stub_header(const char *ofname, const char *ifname)
326 326
327 buf = _include_guard(ifname, "STUBS", buf); 327 buf = _include_guard(ifname, "STUBS", buf);
328 328
329 Eina_Bool ret = _write_file(ofname, buf, EINA_FALSE); 329 Eina_Bool ret = _write_file(ofname, buf);
330 eina_strbuf_free(buf); 330 eina_strbuf_free(buf);
331 return ret; 331 return ret;
332} 332}
@@ -341,7 +341,7 @@ _write_source(const char *ofname, const char *ifname)
341 eo_gen_source_gen(cl, buf); 341 eo_gen_source_gen(cl, buf);
342 if (cl) 342 if (cl)
343 { 343 {
344 if (_write_file(ofname, buf, EINA_FALSE)) 344 if (_write_file(ofname, buf))
345 { 345 {
346 eina_strbuf_free(buf); 346 eina_strbuf_free(buf);
347 return EINA_TRUE; 347 return EINA_TRUE;
@@ -366,7 +366,7 @@ _write_impl(const char *ofname, const char *ifname)
366 return EINA_FALSE; 366 return EINA_FALSE;
367 367
368 eo_gen_impl_gen(cl, buf); 368 eo_gen_impl_gen(cl, buf);
369 Eina_Bool ret = _write_file(ofname, buf, EINA_FALSE); 369 Eina_Bool ret = _write_file(ofname, buf);
370 eina_strbuf_free(buf); 370 eina_strbuf_free(buf);
371 return ret; 371 return ret;
372} 372}