Remove unneeded code with notnull.cocci script
authorlucas <lucas@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 14 Jul 2010 02:05:47 +0000 (02:05 +0000)
committerlucas <lucas@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 14 Jul 2010 02:05:47 +0000 (02:05 +0000)
commitd6d46fb99eacbdc6a2f79a3cfe976d008e22a696
tree8e5e830ac57679490317a47728d57a4f6bc2e1aa
parent141a2f5ded0c49b7e35aca25131c5b5c02f65ba3
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.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/eet@50241 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33
src/lib/eet_cipher.c
src/lib/eet_image.c
src/lib/eet_lib.c