From: lucas Date: Thu, 26 Aug 2010 01:34:13 +0000 (+0000) Subject: Revert and re-apply badnull patch X-Git-Tag: submit/2.0alpha-wayland/20121127.221958~1079 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a4a382878d57596e22d753bd9f96ca90c4d096d1;p=profile%2Fivi%2Fedje.git 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 --- 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; }