From 95349b79a5a646736c706fe19645181146ee9486 Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期二, 20 十月 2020 16:29:59 +0800
Subject: [PATCH] update
---
test/test.c | 20 +++++++++-----------
1 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/test/test.c b/test/test.c
index 0aaa68e..dcb5d74 100644
--- a/test/test.c
+++ b/test/test.c
@@ -1,15 +1,13 @@
#include "usg_common.h"
-#include "usg_typedef.h"
-
-int test(char *src, int size) {
- int i = strlen(src);
- char dest[size];
- strncpy(dest, src, size);
- puts(dest);
- return i;
+
+int test() {
+ static int count = 0;
+ count++;
+ return count;
}
int main() {
- char *str = "hello";
- int r = test(str, strlen(str));
- printf("%d\n", r);
+
+
+ printf("%d\n", test());
+ printf("%d\n", test());
}
\ No newline at end of file
--
Gitblit v1.8.0