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()); }