]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Fix clang warnings in mod_lua
authorTravis Cross <tc@traviscross.com>
Sun, 24 Jun 2012 09:13:21 +0000 (09:13 +0000)
committerTravis Cross <tc@traviscross.com>
Sun, 24 Jun 2012 09:13:21 +0000 (09:13 +0000)
src/mod/languages/mod_lua/mod_lua.cpp

index adb13a43dda2bafc6094aefd69f47c2ec101bdbe..0df0d8f11db1a15fac3d2ae3d8930eea9b26494b 100644 (file)
@@ -260,7 +260,7 @@ static switch_xml_t lua_fetch(const char *section,
                        mod_lua_conjure_event(L, params, "params", 1);
                }
 
-               if( error = lua_parse_and_execute(L, mycmd) ){
+               if((error = lua_parse_and_execute(L, mycmd))){
                    switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "LUA script parse/execute error!\n");
                    return NULL;
                }
@@ -331,7 +331,7 @@ static switch_status_t do_config(void)
 
        if (cpath_stream.data_len) {
                char *lua_cpath = NULL;
-               if (lua_cpath = getenv("LUA_CPATH")) {
+               if ((lua_cpath = getenv("LUA_CPATH"))) {
                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "lua: appending LUA_CPATH: '%s'\n", lua_cpath);
                        cpath_stream.write_function(&cpath_stream, ";%s", lua_cpath);
                }
@@ -349,7 +349,7 @@ static switch_status_t do_config(void)
 
        if (path_stream.data_len) {
                char *lua_path = NULL;
-               if (lua_path = getenv("LUA_PATH")) {
+               if ((lua_path = getenv("LUA_PATH"))) {
                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "lua: appending LUA_PATH: '%s'\n", lua_path);
                        path_stream.write_function(&path_stream, ";%s", lua_path);
                }