forked from enlightenment/efl
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:
parent
e26164d164
commit
b45b6fb6af
|
@ -832,6 +832,7 @@ eina_file_open(const char *filename, Eina_Bool shared)
|
||||||
EAPI void
|
EAPI void
|
||||||
eina_file_close(Eina_File *file)
|
eina_file_close(Eina_File *file)
|
||||||
{
|
{
|
||||||
|
if (!file) return;
|
||||||
eina_lock_take(&file->lock);
|
eina_lock_take(&file->lock);
|
||||||
file->refcount--;
|
file->refcount--;
|
||||||
eina_lock_release(&file->lock);
|
eina_lock_release(&file->lock);
|
||||||
|
@ -843,18 +844,21 @@ eina_file_close(Eina_File *file)
|
||||||
EAPI size_t
|
EAPI size_t
|
||||||
eina_file_size_get(Eina_File *file)
|
eina_file_size_get(Eina_File *file)
|
||||||
{
|
{
|
||||||
|
if (!file) return 0;
|
||||||
return file->length;
|
return file->length;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI time_t
|
EAPI time_t
|
||||||
eina_file_mtime_get(Eina_File *file)
|
eina_file_mtime_get(Eina_File *file)
|
||||||
{
|
{
|
||||||
|
if (!file) return 0;
|
||||||
return file->mtime;
|
return file->mtime;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI const char *
|
EAPI const char *
|
||||||
eina_file_filename_get(Eina_File *file)
|
eina_file_filename_get(Eina_File *file)
|
||||||
{
|
{
|
||||||
|
if (!file) return NULL;
|
||||||
return file->filename;
|
return file->filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue