瀏覽代碼

Auto format source code

bel 9 年之前
父節點
當前提交
62e4d79ac3
共有 3 個文件被更改,包括 14 次插入13 次删除
  1. 12 10
      src/civetweb.c
  2. 0 1
      src/mod_lua.inl
  3. 2 2
      src/third_party/civetweb_lua.h

+ 12 - 10
src/civetweb.c

@@ -1219,6 +1219,7 @@ void mg_set_thread_name(const char *threadName) {}
 #if defined(MG_LEGACY_INTERFACE)
 const char **mg_get_valid_option_names(void)
 {
+	/* This function is deprecated. Use mg_get_valid_options instead. */
 	static const char *
 	    data[2 * sizeof(config_options) / sizeof(config_options[0])] = {0};
 	int i;
@@ -4948,15 +4949,16 @@ static int mg_inet_pton(int af, const char *src, void *dst, size_t dstlen)
 }
 
 
-static int connect_socket(struct mg_context *ctx /* may be null */,
-                          const char *host,
-                          int port,
-                          int use_ssl,
-                          char *ebuf,
-                          size_t ebuf_len,
-                          SOCKET *sock /* output: socket */,
-                          union usa *sa /* output: socket address */
-                          )
+static int
+connect_socket(struct mg_context *ctx /* may be NULL */,
+               const char *host,
+               int port,
+               int use_ssl,
+               char *ebuf,
+               size_t ebuf_len,
+               SOCKET *sock /* output: socket, must not be NULL */,
+               union usa *sa /* output: socket address, must not be NULL  */
+               )
 {
 	int ip_ver = 0;
 	*sock = INVALID_SOCKET;
@@ -6090,7 +6092,7 @@ static void addenv(struct cgi_environment *env,
 
 
 /* Append VARIABLE=VALUE\0 string to the buffer, and add a respective
- * pointer into the vars array. Assumes block != NULL and fmt != NULL. */
+ * pointer into the vars array. Assumes env != NULL and fmt != NULL. */
 static void addenv(struct cgi_environment *env, const char *fmt, ...)
 {
 	size_t n, space;

+ 0 - 1
src/mod_lua.inl

@@ -1615,4 +1615,3 @@ static void lua_websocket_close(struct mg_connection *conn, void *ws_arg)
 	(void)pthread_mutex_unlock(&ws->ws_mutex);
 }
 #endif
-

+ 2 - 2
src/third_party/civetweb_lua.h

@@ -65,9 +65,9 @@
 
 #ifdef LUA_VERSION_MAKEFILE
 #if LUA_VERSION_MAKEFILE != LUA_VERSION_NUM
-#error "Mismatch between Lua version specified in Makefile and Lua version in lua.h"
+#error                                                                         \
+    "Mismatch between Lua version specified in Makefile and Lua version in lua.h"
 #endif
 #endif
 
 #endif /* #ifndef CIVETWEB_LUA_H */
-