On Wed, Sep 26, 2012 at 4:19 PM, Eduardo Lima (Etrunko) <ebl...@gmail.com> wrote: > On Wed, Sep 26, 2012 at 4:01 PM, Enlightenment SVN > <no-re...@enlightenment.org> wrote: >> Log: >> Ecore_Evas (wayland): Remove goto. (don't need them, don't want them) > > Why? There is goto all over the code.
And your commit leaves the file open if nothing goes wrong > >> ;) Also, remove an extra blank line that got in there. >> >> >> >> Author: devilhorns >> Date: 2012-09-26 12:01:04 -0700 (Wed, 26 Sep 2012) >> New Revision: 77099 >> Trac: http://trac.enlightenment.org/e/changeset/77099 >> >> Modified: >> trunk/ecore/src/lib/ecore_evas/ecore_evas_wayland_shm.c >> >> Modified: trunk/ecore/src/lib/ecore_evas/ecore_evas_wayland_shm.c >> =================================================================== >> --- trunk/ecore/src/lib/ecore_evas/ecore_evas_wayland_shm.c 2012-09-26 >> 18:49:16 UTC (rev 77098) >> +++ trunk/ecore/src/lib/ecore_evas/ecore_evas_wayland_shm.c 2012-09-26 >> 19:01:04 UTC (rev 77099) >> @@ -962,7 +962,8 @@ >> if (ftruncate(fd, size) < 0) >> { >> ERR("Could not truncate temporary file."); >> - goto end; >> + close(fd); >> + return; >> } >> >> data = mmap(NULL, size, (PROT_READ | PROT_WRITE), MAP_SHARED, fd, 0); >> @@ -971,15 +972,13 @@ >> if (data == MAP_FAILED) >> { >> ERR("mmap of temporary file failed."); >> - goto end; >> + close(fd); >> + return; >> } >> >> ee->engine.wl.pool_size = size; >> ee->engine.wl.pool_data = data; >> ee->engine.wl.pool = wl_shm_create_pool(shm, fd, size); >> - >> - end: >> - close(fd); >> } >> >> static void >> @@ -1009,7 +1008,6 @@ >> _ecore_evas_wl_buffer_free(ee); >> ee->engine.wl.buffer = >> wl_shm_pool_create_buffer(ee->engine.wl.pool, 0, w, h, stride, format); >> - >> } >> >> void >> >> >> ------------------------------------------------------------------------------ >> How fast is your code? >> 3 out of 4 devs don\\\'t know how their code performs in production. >> Find out how slow your code is with AppDynamics Lite. >> http://ad.doubleclick.net/clk;262219672;13503038;z? >> http://info.appdynamics.com/FreeJavaPerformanceDownload.html >> _______________________________________________ >> enlightenment-svn mailing list >> enlightenment-...@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn > > > > -- > Eduardo de Barros Lima ◤✠◢ > ebl...@gmail.com -- Eduardo de Barros Lima ◤✠◢ ebl...@gmail.com ------------------------------------------------------------------------------ How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel