瀏覽代碼

mod_lua: fix strchr

pavel pimenov 7 年之前
父節點
當前提交
255d8f03c2
共有 1 個文件被更改,包括 3 次插入4 次删除
  1. 3 4
      src/mod_lua.inl

+ 3 - 4
src/mod_lua.inl

@@ -417,7 +417,6 @@ lsp_kepler_reader(lua_State *L, void *ud, size_t *sz)
 	const char *ret;
 	int64_t i;
 	int64_t left;
-	char end[4];
 
 	(void)(L); /* unused */
 
@@ -2216,13 +2215,13 @@ prepare_lua_environment(struct mg_context *ctx,
 	/* If debugging is enabled, add a hook */
 	if (debug_params) {
 		int mask = 0;
-		if (0 != strchr(debug_params, "c")) {
+		if (0 != strchr(debug_params, 'c')) {
 			mask |= LUA_MASKCALL;
 		}
-		if (0 != strchr(debug_params, "r")) {
+		if (0 != strchr(debug_params, 'r')) {
 			mask |= LUA_MASKRET;
 		}
-		if (0 != strchr(debug_params, "l")) {
+		if (0 != strchr(debug_params, 'l')) {
 			mask |= LUA_MASKLINE;
 		}
 		lua_sethook(L, lua_debug_hook, mask, 0);