Here is a small patch for Efreet which fixes the warning(s) issued at E
startup about eina_hash_del being called with Data == NULL. This patch
does fix the problem, but there may be a better way to go about this,
hence why I did not direct commit.
I've tested it here with no ill effects, but I know the formatting is
off as efreet does not use the standard E formatting.
dh
Index: efreet_menu.c
===================================================================
--- efreet_menu.c (revision 47995)
+++ efreet_menu.c (working copy)
@@ -494,36 +494,56 @@
for (i = 0; menu_cbs[i].key != NULL; i++)
{
- eina_hash_del(efreet_menu_handle_cbs,
- menu_cbs[i].key,
- NULL);
+ struct menu_cbs *cb;
+
+ if ((cb = eina_hash_find(efreet_menu_handle_cbs, menu_cbs[i].key)))
+ {
+ eina_hash_del(efreet_menu_handle_cbs,
+ menu_cbs[i].key,
+ cb);
+ }
eina_hash_add(efreet_menu_handle_cbs,
menu_cbs[i].key,
menu_cbs[i].cb);
}
for (i = 0; filter_cbs[i].key != NULL; i++)
{
- eina_hash_del(efreet_menu_filter_cbs,
- filter_cbs[i].key,
- NULL);
+ struct filter_cbs *cb;
+
+ if ((cb = eina_hash_find(efreet_menu_filter_cbs, filter_cbs[i].key)))
+ {
+ eina_hash_del(efreet_menu_filter_cbs,
+ filter_cbs[i].key,
+ cb);
+ }
eina_hash_add(efreet_menu_filter_cbs,
filter_cbs[i].key,
filter_cbs[i].cb);
}
for (i = 0; move_cbs[i].key != NULL; i++)
{
- eina_hash_del(efreet_menu_move_cbs,
- move_cbs[i].key,
- NULL);
+ struct move_cbs *cb;
+
+ if ((cb = eina_hash_find(efreet_menu_move_cbs, move_cbs[i].key)))
+ {
+ eina_hash_del(efreet_menu_move_cbs,
+ move_cbs[i].key,
+ cb);
+ }
eina_hash_add(efreet_menu_move_cbs,
move_cbs[i].key,
move_cbs[i].cb);
}
for (i = 0; layout_cbs[i].key != NULL; i++)
{
- eina_hash_del(efreet_menu_layout_cbs,
- layout_cbs[i].key,
- NULL);
+ struct layout_cbs *cb;
+
+ if ((cb = eina_hash_find(efreet_menu_layout_cbs, layout_cbs[i].key)))
+ {
+ eina_hash_del(efreet_menu_layout_cbs,
+ layout_cbs[i].key,
+ cb);
+ }
eina_hash_add(efreet_menu_layout_cbs,
layout_cbs[i].key,
layout_cbs[i].cb);
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel