check strings not null

SVN revision: 49230
This commit is contained in:
Hannes Janetzek 2010-05-27 12:45:41 +00:00
parent 06bfeb30a0
commit 702218034b
2 changed files with 10 additions and 0 deletions

View File

@ -2563,6 +2563,9 @@ _e_fm2_client_mount(const char *udi, const char *mountpoint)
char *d;
int l, l1, l2;
if (!udi || !mountpoint)
return 0;
l1 = strlen(udi);
l2 = strlen(mountpoint);
l = l1 + 1 + l2 + 1;
@ -2579,6 +2582,9 @@ _e_fm2_client_unmount(const char *udi)
char *d;
int l, l1;
if (!udi)
return 0;
l1 = strlen(udi);
l = l1 + 1;
d = alloca(l);
@ -2595,6 +2601,9 @@ _e_fm2_client_eject(const char *udi)
char *data;
int size;
if (!udi)
return 0;
size = strlen(udi) + 1;
data = alloca(size);
strcpy(data, udi);

View File

@ -463,6 +463,7 @@ e_fm2_dbus_mount_find(const char *path)
EINA_LIST_FOREACH(_e_vols, l, v)
{
if (v->mounted
&& v->mount_point
&& !strncmp(path, v->mount_point, strlen(v->mount_point))
&& v->mounts)
return eina_list_data_get(v->mounts);