From 012a3243ad28354247031b579a047b7a5d76f9f5 Mon Sep 17 00:00:00 2001 From: tezc Date: Wed, 14 Apr 2021 01:25:28 +0300 Subject: [PATCH] documentation fix --- string/README.md | 2 +- string/str_example.c | 2 +- timer/CMakeLists.txt | 4 ++-- uri/README.md | 2 +- uri/uri_example.c | 6 ++---- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/string/README.md b/string/README.md index cfb2d40..201ecb9 100644 --- a/string/README.md +++ b/string/README.md @@ -49,7 +49,7 @@ int main(int argc, char *argv[]) sc_str_substring(&s1, 0, 5); printf("%s \n", s1); // prints hello - sc_str_destroy(s1); + sc_str_destroy(&s1); return 0; } diff --git a/string/str_example.c b/string/str_example.c index 3977a25..3396434 100644 --- a/string/str_example.c +++ b/string/str_example.c @@ -21,7 +21,7 @@ int main() sc_str_substring(&s1, 0, 5); printf("%s \n", s1); // prints hello - sc_str_destroy(s1); + sc_str_destroy(&s1); return 0; } diff --git a/timer/CMakeLists.txt b/timer/CMakeLists.txt index f27c8b0..002ef4a 100644 --- a/timer/CMakeLists.txt +++ b/timer/CMakeLists.txt @@ -82,7 +82,7 @@ if (SC_BUILD_TEST) ${CMAKE_CTEST_COMMAND} -C $ --verbose WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) - # ----------------------- - Code Coverage Start ----------------------------- # +# ----------------------- - Code Coverage Start ----------------------------- # if (${CMAKE_BUILD_TYPE} MATCHES "Coverage") if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") @@ -105,7 +105,7 @@ if (SC_BUILD_TEST) add_dependencies(coverage_${PROJECT_NAME} check_${PROJECT_NAME}) - # -------------------------- Code Coverage End ------------------------------ # +# -------------------------- Code Coverage End ------------------------------ # endif () # ----------------------- Test Configuration End ---------------------------- # diff --git a/uri/README.md b/uri/README.md index 4e8fa50..2644d6a 100644 --- a/uri/README.md +++ b/uri/README.md @@ -29,7 +29,7 @@ int main(int argc, char *argv[]) printf("%s \n", uri->query); // prints "name=jane" printf("%s \n", uri->fragment); // prints "doe" - sc_uri_destroy(uri); + sc_uri_destroy(&uri); return 0; } diff --git a/uri/uri_example.c b/uri/uri_example.c index 3b515e5..c8a791d 100644 --- a/uri/uri_example.c +++ b/uri/uri_example.c @@ -7,9 +7,7 @@ int main() struct sc_uri *uri; uri = sc_uri_create("http://user:pass@any.com:8042/over/" "there?name=jane#doe"); - printf("%s \n", - uri->str); // prints - // "http://user:pass@any.com:8042/over/there?name=jane#doe" + printf("%s \n", uri->str); // prints "http://user:pass@any.com:8042/over/there?name=jane#doe" printf("%s \n", uri->scheme); // prints "http" printf("%s \n", uri->host); // prints "any.com" printf("%s \n", uri->userinfo); // prints "user:pass" @@ -18,7 +16,7 @@ int main() printf("%s \n", uri->query); // prints "name=jane" printf("%s \n", uri->fragment); // prints "doe" - sc_uri_destroy(uri); + sc_uri_destroy(&uri); return 0; }