q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d558c0122f30668dcc2fe21b49a82c8388b5e318
commit d558c0122f30668dcc2fe21b49a82c8388b5e318 Author: Daniel Kolesa <d.kol...@osg.samsung.com> Date: Fri Mar 11 16:19:53 2016 +0000 eolian generator: close the file with zero write --- src/bin/eolian/main.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/bin/eolian/main.c b/src/bin/eolian/main.c index f545960..55c9399 100644 --- a/src/bin/eolian/main.c +++ b/src/bin/eolian/main.c @@ -105,20 +105,22 @@ _write_file(const char *filename, const Eina_Strbuf *buffer, Eina_Bool append) return EINA_FALSE; } + Eina_Bool ret = EINA_TRUE; size_t blen = eina_strbuf_length_get(buffer); + if (!blen) - return EINA_TRUE; + goto end; if (fwrite(eina_strbuf_string_get(buffer), 1, blen, fd) != blen) { fprintf(stderr, "eolian: could not write '%s' (%s)\n", filename, strerror(errno)); - fclose(fd); - return EINA_FALSE; + ret = EINA_FALSE; } +end: fclose(fd); - return EINA_TRUE; + return ret; } static Eina_Bool --