Revert and re-apply badnull patch
authorlucas <lucas>
Thu, 26 Aug 2010 01:34:13 +0000 (01:34 +0000)
committerlucas <lucas@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 26 Aug 2010 01:34:13 +0000 (01:34 +0000)
Revert previous patch generated by badnull.cocci script, and apply the new one.
The main difference is that assert and assert-like functions are not touched
anymore.

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@51650 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/edje_lua.c

index 892bca7..b9afd1d 100644 (file)
@@ -389,7 +389,7 @@ _edje_lua_new_class(lua_State *L, const Edje_Lua_Reg ** class)
 {
    int n = 0;
    _edje_lua_new_metatable(L, class);
-   while (class && (class[n]))
+   while (class && (class[n] != NULL))
      {
        luaL_register(L, NULL, class[n]->mt);
        lua_pushstring(L, "hands off, it's none of your business!");
@@ -5079,7 +5079,7 @@ _edje_lua_alloc(void *ud, void *ptr, size_t osize, size_t nsize)
 void
 _edje_lua_init()
 {
-   if (Ledje) return;
+   if (Ledje != NULL) return;
    /*
     * create main Lua state with the custom memory allocation function
     */
@@ -5165,7 +5165,7 @@ _edje_lua_init()
 void
 _edje_lua_shutdown()
 {
-   if (!Ledje) return;
+   if (Ledje == NULL) return;
    lua_close(Ledje);
    Ledje = NULL;
 }