forked from enlightenment/enlightenment
ukit integration taking way longer than expected, so I'm fixing all the stringshares now. should be safe to use. hooray.
SVN revision: 48414
This commit is contained in:
parent
4b51ec0c20
commit
97da075d67
|
@ -1311,7 +1311,7 @@ e_fm2_parent_go(Evas_Object *obj)
|
|||
if (!evas_object_type_get(obj)) return; // safety
|
||||
if (strcmp(evas_object_type_get(obj), "e_fm")) return; // safety
|
||||
if (!sd->path) return;
|
||||
path = strdup(sd->path);
|
||||
path = eina_stringshare_add(sd->path);
|
||||
if (!path) return;
|
||||
if ((p = strrchr(path, '/'))) *p = 0;
|
||||
if (*path == 0)
|
||||
|
@ -1319,7 +1319,7 @@ e_fm2_parent_go(Evas_Object *obj)
|
|||
else
|
||||
e_fm2_path_set(obj, sd->dev, path);
|
||||
|
||||
free(path);
|
||||
eina_stringshare_del(path);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
@ -2014,7 +2014,7 @@ _e_fm2_icon_mime_fdo_get(Evas *evas, const E_Fm2_Icon *ic, const char **type_ret
|
|||
{
|
||||
Evas_Object *o;
|
||||
o = _e_fm2_icon_explicit_get(evas, ic, icon, type_ret);
|
||||
free((char *) icon);
|
||||
free(icon);
|
||||
return o;
|
||||
}
|
||||
return NULL;
|
||||
|
@ -9698,7 +9698,7 @@ _e_fm2_volume_mount(void *data, E_Menu *m, E_Menu_Item *mi)
|
|||
|
||||
mp = e_fm2_hal_volume_mountpoint_get(v);
|
||||
_e_fm2_client_mount(v->udi, mp);
|
||||
free(mp);
|
||||
eina_stringshare_del(mp);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -138,7 +138,7 @@ e_fm2_hal_volume_add(E_Volume *v)
|
|||
/* Check mount point */
|
||||
if ((!v->mount_point) || (v->mount_point[0] == 0))
|
||||
{
|
||||
if (v->mount_point) free(v->mount_point);
|
||||
if (v->mount_point) eina_stringshare_del(v->mount_point);
|
||||
v->mount_point = NULL;
|
||||
v->mount_point = e_fm2_hal_volume_mountpoint_get(v);
|
||||
if ((!v->mount_point) || (v->mount_point[0] == 0))
|
||||
|
@ -146,7 +146,7 @@ e_fm2_hal_volume_add(E_Volume *v)
|
|||
char buf[PATH_MAX];
|
||||
char *id;
|
||||
|
||||
if (v->mount_point) free(v->mount_point);
|
||||
if (v->mount_point) eina_stringshare_del(v->mount_point);
|
||||
v->mount_point = NULL;
|
||||
id = "disk";
|
||||
if ((v->uuid) && (v->uuid[0])) id = v->uuid;
|
||||
|
@ -158,7 +158,7 @@ e_fm2_hal_volume_add(E_Volume *v)
|
|||
snprintf(buf, sizeof(buf), "/tmp/%s", id);
|
||||
else
|
||||
buf[0] = 0;
|
||||
v->mount_point = strdup(buf);
|
||||
v->mount_point = eina_stringshare_add(buf);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -223,8 +223,8 @@ e_fm2_hal_volume_add(E_Volume *v)
|
|||
|
||||
if (label[0])
|
||||
{
|
||||
if (v->label) free(v->label);
|
||||
v->label = strdup(label);
|
||||
if (v->label) eina_stringshare_del(v->label);
|
||||
v->label = eina_stringshare_add(label);
|
||||
}
|
||||
|
||||
/* Choose the icon */
|
||||
|
@ -254,8 +254,8 @@ e_fm2_hal_volume_add(E_Volume *v)
|
|||
}
|
||||
if (icon)
|
||||
{
|
||||
if (v->icon) free(v->icon);
|
||||
v->icon = strdup(icon);
|
||||
if (v->icon) eina_stringshare_del(v->icon);
|
||||
v->icon = eina_stringshare_add(icon);
|
||||
}
|
||||
|
||||
if ((!v->mount_point) ||
|
||||
|
@ -387,7 +387,7 @@ e_fm2_hal_volume_mountpoint_get(E_Volume *v)
|
|||
if (v->mount_point)
|
||||
{
|
||||
// printf("GET MOUNTPOINT = %s\n", v->mount_point);
|
||||
return strdup(v->mount_point);
|
||||
return eina_stringshare_add(v->mount_point);
|
||||
}
|
||||
|
||||
if (v->label && v->label[0] != '\0')
|
||||
|
@ -402,7 +402,7 @@ e_fm2_hal_volume_mountpoint_get(E_Volume *v)
|
|||
snprintf(buf, sizeof(buf) - 1, "/media/unknown-%i", mount_count++);
|
||||
}
|
||||
// printf("GET MOUNTPOINT = %s\n", buf);
|
||||
return strdup(buf);
|
||||
return eina_stringshare_add(buf);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
@ -415,8 +415,8 @@ e_fm2_hal_mount_add(E_Volume *v, const char *mountpoint)
|
|||
if (mountpoint && (*mountpoint != 0))
|
||||
{
|
||||
if (v->mount_point)
|
||||
free(v->mount_point);
|
||||
v->mount_point = strdup(mountpoint);
|
||||
eina_stringshare_del(v->mount_point);
|
||||
v->mount_point = eina_stringshare_add(mountpoint);
|
||||
}
|
||||
|
||||
EINA_LIST_FOREACH(v->mounts, l, m)
|
||||
|
@ -434,7 +434,7 @@ e_fm2_hal_mount_del(E_Volume *v)
|
|||
v->mounted = 0;
|
||||
if (v->mount_point)
|
||||
{
|
||||
free(v->mount_point);
|
||||
eina_stringshare_del(v->mount_point);
|
||||
v->mount_point = NULL;
|
||||
}
|
||||
|
||||
|
@ -521,7 +521,7 @@ e_fm2_hal_mount_fail(E_Volume *v)
|
|||
v->mounted = 0;
|
||||
if (v->mount_point)
|
||||
{
|
||||
free(v->mount_point);
|
||||
eina_stringshare_del(v->mount_point);
|
||||
v->mount_point = NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -354,9 +354,9 @@ _e_dbus_cb_dev_all(void *user_data, void *reply_data, DBusError *error)
|
|||
{
|
||||
// printf("DB INIT DEV+: %s\n", udi);
|
||||
e_hal_device_query_capability(_e_dbus_conn, udi, "storage",
|
||||
_e_dbus_cb_store_is, strdup(udi));
|
||||
_e_dbus_cb_store_is, eina_stringshare_add(udi));
|
||||
e_hal_device_query_capability(_e_dbus_conn, udi, "volume",
|
||||
_e_dbus_cb_vol_is, strdup(udi));
|
||||
_e_dbus_cb_vol_is, eina_stringshare_add(udi));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -423,7 +423,7 @@ _e_dbus_cb_store_is(void *user_data, void *reply_data, DBusError *error)
|
|||
}
|
||||
|
||||
error:
|
||||
free(udi);
|
||||
eina_stringshare_del(udi);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -445,7 +445,7 @@ _e_dbus_cb_vol_is(void *user_data, void *reply_data, DBusError *error)
|
|||
}
|
||||
|
||||
error:
|
||||
free(udi);
|
||||
eina_stringshare_del(udi);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -458,9 +458,9 @@ _e_dbus_cb_dev_add(void *data, DBusMessage *msg)
|
|||
dbus_message_get_args(msg, &err, DBUS_TYPE_STRING, &udi, DBUS_TYPE_INVALID);
|
||||
if (!udi) return;
|
||||
e_hal_device_query_capability(_e_dbus_conn, udi, "storage",
|
||||
_e_dbus_cb_store_is, strdup(udi));
|
||||
_e_dbus_cb_store_is, eina_stringshare_add(udi));
|
||||
e_hal_device_query_capability(_e_dbus_conn, udi, "volume",
|
||||
_e_dbus_cb_vol_is, strdup(udi));
|
||||
_e_dbus_cb_vol_is, eina_stringshare_add(udi));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -622,7 +622,7 @@ e_storage_add(const char *udi)
|
|||
if (e_storage_find(udi)) return NULL;
|
||||
s = calloc(1, sizeof(E_Storage));
|
||||
if (!s) return NULL;
|
||||
s->udi = strdup(udi);
|
||||
s->udi = eina_stringshare_del(udi);
|
||||
_e_stores = eina_list_append(_e_stores, s);
|
||||
e_hal_device_get_all_properties(_e_dbus_conn, s->udi,
|
||||
_e_dbus_cb_store_prop, s);
|
||||
|
@ -668,7 +668,7 @@ _e_dbus_cb_vol_prop(void *data, void *reply_data, DBusError *error)
|
|||
E_Storage *s = NULL;
|
||||
E_Hal_Device_Get_All_Properties_Return *ret = reply_data;
|
||||
int err = 0;
|
||||
char *str = NULL;
|
||||
const char *str = NULL;
|
||||
|
||||
if (!ret) goto error;
|
||||
if (dbus_error_is_set(error))
|
||||
|
@ -685,7 +685,7 @@ _e_dbus_cb_vol_prop(void *data, void *reply_data, DBusError *error)
|
|||
str = e_hal_property_string_get(ret, "volume.fsusage", &err);
|
||||
if (err || !str) goto error;
|
||||
if (strcmp(str, "filesystem")) goto error;
|
||||
free(str);
|
||||
eina_stringshare_del(str);
|
||||
str = NULL;
|
||||
|
||||
v->uuid = e_hal_property_string_get(ret, "volume.uuid", &err);
|
||||
|
@ -801,7 +801,7 @@ _e_dbus_cb_vol_prop_mount_modified(void *data, void *reply_data, DBusError *erro
|
|||
v->mounted = e_hal_property_bool_get(ret, "volume.is_mounted", &err);
|
||||
if (err) printf("HAL Error : can't get volume.is_mounted property");
|
||||
|
||||
if (v->mount_point) free(v->mount_point);
|
||||
if (v->mount_point) eina_stringshare_del(v->mount_point);
|
||||
v->mount_point = e_hal_property_string_get(ret, "volume.mount_point", &err);
|
||||
if (err) printf("HAL Error : can't get volume.is_mount_point property");
|
||||
|
||||
|
@ -840,7 +840,7 @@ e_volume_add(const char *udi, char first_time)
|
|||
v = calloc(1, sizeof(E_Volume));
|
||||
if (!v) return NULL;
|
||||
// printf("VOL+ %s\n", udi);
|
||||
v->udi = strdup(udi);
|
||||
v->udi = eina_stringshare_del(udi);
|
||||
v->icon = NULL;
|
||||
v->first_time = first_time;
|
||||
_e_vols = eina_list_append(_e_vols, v);
|
||||
|
@ -1603,8 +1603,8 @@ _e_ipc_cb_server_data(void *data, int type, void *event)
|
|||
{
|
||||
if (mountpoint[0])
|
||||
{
|
||||
if (v->mount_point) free(v->mount_point);
|
||||
v->mount_point = strdup(mountpoint);
|
||||
if (v->mount_point) eina_stringshare_del(v->mount_point);
|
||||
v->mount_point = eina_stringshare_add(mountpoint);
|
||||
}
|
||||
// printf("REQ M\n");
|
||||
e_volume_mount(v);
|
||||
|
|
|
@ -393,7 +393,7 @@ _battery_hal_battery_props(void *data, void *reply_data, DBusError *error __UNUS
|
|||
{
|
||||
E_Hal_Properties *ret = reply_data;
|
||||
int err = 0;
|
||||
char *str;
|
||||
const char *str;
|
||||
Hal_Battery *hbat;
|
||||
|
||||
hbat = data;
|
||||
|
@ -410,7 +410,7 @@ _battery_hal_battery_props(void *data, void *reply_data, DBusError *error __UNUS
|
|||
if (str) \
|
||||
{ \
|
||||
hbat->val = eina_stringshare_add(str); \
|
||||
free(str); \
|
||||
eina_stringshare_del(str); \
|
||||
}
|
||||
|
||||
GET_BOOL(present, "battery.present");
|
||||
|
@ -438,7 +438,7 @@ _battery_hal_ac_adapter_props(void *data, void *reply_data, DBusError *error __U
|
|||
{
|
||||
E_Hal_Properties *ret = reply_data;
|
||||
int err = 0;
|
||||
char *str;
|
||||
const char *str;
|
||||
Hal_Ac_Adapter *hac;
|
||||
|
||||
hac = data;
|
||||
|
@ -455,7 +455,7 @@ _battery_hal_ac_adapter_props(void *data, void *reply_data, DBusError *error __U
|
|||
if (str) \
|
||||
{ \
|
||||
hac->val = eina_stringshare_add(str); \
|
||||
free(str); \
|
||||
eina_stringshare_del(str); \
|
||||
}
|
||||
|
||||
GET_BOOL(present, "ac_adapter.present");
|
||||
|
@ -627,7 +627,7 @@ _battery_hal_is_battery(void *user_data, void *reply_data, DBusError *err)
|
|||
}
|
||||
if (ret && ret->boolean) _battery_hal_battery_add(udi);
|
||||
error:
|
||||
free(udi);
|
||||
eina_stringshare_del(udi);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -645,7 +645,7 @@ _battery_hal_is_ac_adapter(void *user_data, void *reply_data, DBusError *err)
|
|||
}
|
||||
if (ret && ret->boolean) _battery_hal_ac_adapter_add(udi);
|
||||
error:
|
||||
free(udi);
|
||||
eina_stringshare_del(udi);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -662,9 +662,9 @@ _battery_hal_dev_add(void *data __UNUSED__, DBusMessage *msg)
|
|||
if (!conn) return;
|
||||
// FIXME: e_dbus doesnt allow us to track this pending call
|
||||
e_hal_device_query_capability(conn, udi, "battery",
|
||||
_battery_hal_is_battery, strdup(udi));
|
||||
_battery_hal_is_battery, eina_stringshare_add(udi));
|
||||
e_hal_device_query_capability(conn, udi, "ac_adapter",
|
||||
_battery_hal_is_ac_adapter, strdup(udi));
|
||||
_battery_hal_is_ac_adapter, eina_stringshare_add(udi));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -228,7 +228,7 @@ _e_mod_menu_gtk_cb(void *data, E_Menu *m, E_Menu_Item *mi)
|
|||
{
|
||||
char *path = data;
|
||||
if (m->zone) e_fwin_new(m->zone->container, NULL, path);
|
||||
free(path);
|
||||
eina_stringshare_del(path);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -296,7 +296,7 @@ _e_mod_fileman_parse_gtk_bookmarks(E_Menu *m, Eina_Bool need_separator)
|
|||
ecore_file_file_get(uri->path));
|
||||
e_util_menu_item_theme_icon_set(mi, "folder");
|
||||
e_menu_item_callback_set(mi, _e_mod_menu_gtk_cb,
|
||||
strdup(uri->path));
|
||||
eina_stringshare_del(uri->path));
|
||||
}
|
||||
}
|
||||
if (uri) efreet_uri_free(uri);
|
||||
|
|
|
@ -115,7 +115,7 @@ _e_kbd_free(E_Kbd *kbd)
|
|||
// if (kbd->border) kbd->border->stolen = 0;
|
||||
EINA_LIST_FREE(kbd->waiting_borders, bd)
|
||||
bd->stolen = 0;
|
||||
free(kbd);
|
||||
eina_stringshare_del(kbd);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -758,7 +758,7 @@ _e_kbd_dbus_cb_input_keyboard_is(void *user_data, void *reply_data, DBusError *e
|
|||
}
|
||||
|
||||
error:
|
||||
free(udi);
|
||||
eina_stringshare_del(udi);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -769,10 +769,10 @@ _e_kbd_dbus_cb_dev_add(void *data, DBusMessage *msg)
|
|||
|
||||
dbus_error_init(&err);
|
||||
dbus_message_get_args(msg, &err, DBUS_TYPE_STRING, &udi, DBUS_TYPE_INVALID);
|
||||
udi = strdup(udi);
|
||||
udi = eina_stringshare_add(udi);
|
||||
e_hal_device_query_capability(_e_kbd_dbus_conn, udi, "input.keyboard",
|
||||
_e_kbd_dbus_cb_input_keyboard_is,
|
||||
strdup(udi));
|
||||
eina_stringshare_add(udi));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue