From 737eacb13ce9550f9820cbc55eec8b38fa2fa6a4 Mon Sep 17 00:00:00 2001 From: Brad Hards Date: Sun, 16 Jan 2011 16:22:46 +1100 Subject: [PATCH 1/1] str: change example to match function being explained. Looks like the example was copy-n-pasted from the previous entry. --- ccan/str/str.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ccan/str/str.h b/ccan/str/str.h index 770a40fd..bf858f13 100644 --- a/ccan/str/str.h +++ b/ccan/str/str.h @@ -62,8 +62,10 @@ static inline bool strends(const char *str, const char *postfix) * @needle: a substring * * Example: - * #define PRINT_COND_IF_FALSE(cond) \ - * ((cond) || printf("%s is false!", stringify(cond))) + * int i; + * i = strcount("aaa aaa", "a"); // i = 6; + * i = strcount("aaa aaa", "ab"); // i = 0; + * i = strcount("aaa aaa", "aa"); // i = 2; */ size_t strcount(const char *haystack, const char *needle); -- 2.39.2