On Wed, Oct 04, 2017 at 09:48:47PM -0700, Cedric BAIL wrote: > cedric pushed a commit to branch master. > > http://git.enlightenment.org/core/efl.git/commit/?id=4ccc5d4f683f41e66720505bd8ba69cd6c606610 > > commit 4ccc5d4f683f41e66720505bd8ba69cd6c606610 > Author: Cedric Bail <[email protected]> > Date: Wed Oct 4 20:56:15 2017 -0700 > > eina: allow eina_file_close(NULL) to simplify code using Eina_File. > --- > src/lib/eina/eina_file_common.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/src/lib/eina/eina_file_common.c b/src/lib/eina/eina_file_common.c > index c5a367d079..a2a2c7c3eb 100644 > --- a/src/lib/eina/eina_file_common.c > +++ b/src/lib/eina/eina_file_common.c > @@ -508,7 +508,7 @@ eina_file_clean_close(Eina_File *file) > > // Final death > EINA_MAGIC_SET(file, 0); > - free(file); > + free(file); > } > > EAPI void > @@ -518,8 +518,7 @@ eina_file_close(Eina_File *file) > unsigned int length; > unsigned int key; > > - EINA_FILE_MAGIC_CHECK(file); > - > + if (!file) return ;
Cannot we continue to check the magic after the if(!file) return; ? > eina_lock_take(&_eina_file_lock_cache); > > eina_lock_take(&file->lock); > > -- > > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
