From 6325ab86a3b01c7192e5667f4e106f0b8e6cbc4b Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Wed, 14 Jul 2010 02:05:47 +0000 Subject: [PATCH] Remove unneeded code with notnull.cocci script The notnull.cocci script from Coccinelle finds places where you check if a variable is NULL, but it's known not to be NULL. The check can be safely removed. For example, this code would be caught by notnull: if (!var) return; if (var && var->fld) { ... } It's needless to check again if var is not NULL because if it's in fact NULL, it would have returned on the previous "if". This commit removes all the trivial places where this pattern happens. Another patch will be generated for the more complex cases. SVN revision: 50241 --- legacy/elementary/src/lib/elm_hover.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/elementary/src/lib/elm_hover.c b/legacy/elementary/src/lib/elm_hover.c index 23f4b3f1a6..fe15ab3178 100644 --- a/legacy/elementary/src/lib/elm_hover.c +++ b/legacy/elementary/src/lib/elm_hover.c @@ -240,7 +240,7 @@ _parent_hide(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void * { Widget_Data *wd = elm_widget_data_get(data); if (!wd) return; - if (wd) evas_object_hide(wd->cov); + evas_object_hide(wd->cov); } static void