From bd9d61c39d04f5b5860418a2d558c07d9b0a69d0 Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期一, 12 十月 2020 18:35:28 +0800
Subject: [PATCH] req_rep
---
test/test.c | 14 ++++++++------
src/socket/net_mod_server_socket.c | 2 +-
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/socket/net_mod_server_socket.c b/src/socket/net_mod_server_socket.c
index 198894b..91586c2 100644
--- a/src/socket/net_mod_server_socket.c
+++ b/src/socket/net_mod_server_socket.c
@@ -89,7 +89,7 @@
net_mod_request_head_t request_head;
net_mod_response_head_t response_head;
void *recv_buf;
- static void *buf;
+ static void *buf = NULL;
int recv_size;
static size_t max_buf = 1024;
diff --git a/test/test.c b/test/test.c
index 1f7533b..dcb5d74 100644
--- a/test/test.c
+++ b/test/test.c
@@ -1,11 +1,13 @@
#include "usg_common.h"
-#include "usg_typedef.h"
+int test() {
+ static int count = 0;
+ count++;
+ return count;
+}
int main() {
- char buf[1024];
- sprintf(buf, "%s\n", (char*)"" );
- printf(buf);
- int d = strcmp(trim("", 0), "");
- printf("%d\n", d);
+
+ printf("%d\n", test());
+ printf("%d\n", test());
}
\ No newline at end of file
--
Gitblit v1.8.0