From a4a382878d57596e22d753bd9f96ca90c4d096d1 Mon Sep 17 00:00:00 2001 From: lucas Date: Thu, 26 Aug 2010 01:34:13 +0000 Subject: [PATCH] Revert and re-apply badnull patch 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/edje_lua.c b/src/lib/edje_lua.c index 892bca7..b9afd1d 100644 --- a/src/lib/edje_lua.c +++ b/src/lib/edje_lua.c @@ -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; } -- 2.7.4