seriously guys.

null checks.
why are there still functions that don't have them after we've hit 1.0?


SVN revision: 62900
This commit is contained in:
Mike Blumenkrantz 2011-08-28 06:30:51 +00:00
parent e26164d164
commit b45b6fb6af
1 changed files with 4 additions and 0 deletions

View File

@ -832,6 +832,7 @@ eina_file_open(const char *filename, Eina_Bool shared)
EAPI void
eina_file_close(Eina_File *file)
{
if (!file) return;
eina_lock_take(&file->lock);
file->refcount--;
eina_lock_release(&file->lock);
@ -843,18 +844,21 @@ eina_file_close(Eina_File *file)
EAPI size_t
eina_file_size_get(Eina_File *file)
{
if (!file) return 0;
return file->length;
}
EAPI time_t
eina_file_mtime_get(Eina_File *file)
{
if (!file) return 0;
return file->mtime;
}
EAPI const char *
eina_file_filename_get(Eina_File *file)
{
if (!file) return NULL;
return file->filename;
}