From: Travis Cross Date: Sun, 24 Jun 2012 09:13:21 +0000 (+0000) Subject: Fix clang warnings in mod_lua X-Git-Tag: v1.2.0~262 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ee8c9e869ba0da3d4f620769c1e241be71d99e6f;p=thirdparty%2Ffreeswitch.git Fix clang warnings in mod_lua --- diff --git a/src/mod/languages/mod_lua/mod_lua.cpp b/src/mod/languages/mod_lua/mod_lua.cpp index adb13a43dd..0df0d8f11d 100644 --- a/src/mod/languages/mod_lua/mod_lua.cpp +++ b/src/mod/languages/mod_lua/mod_lua.cpp @@ -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); }