summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-10-15 08:02:48 +0200
committerDaniel Stenberg <daniel@haxx.se>2021-10-15 08:02:48 +0200
commit24a558c769862087435005d48f88964d286dc010 (patch)
treea3941f6a2ca0e28e73430c4af1fb0e0b7ae4ad47
parentd79a2664ae719cf18526b7767a84b92c3bd24eed (diff)
downloadcurl-bagder/htmltidy-fix.tar.gz
examples/htmltidy: correct wrong printf() usebagder/htmltidy-fix
... and update the includes to match how current htmltidy wants them used. Reported-by: Stathis Kapnidis Fixes #7860
-rw-r--r--docs/examples/htmltidy.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/examples/htmltidy.c b/docs/examples/htmltidy.c
index be5350cd4..d250cb9de 100644
--- a/docs/examples/htmltidy.c
+++ b/docs/examples/htmltidy.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -28,8 +28,8 @@
*/
#include <stdio.h>
-#include <tidy.h>
-#include <tidybuffio.h>
+#include <tidy/tidy.h>
+#include <tidy/tidybuffio.h>
#include <curl/curl.h>
/* curl write callback, to fill tidy's input buffer... */
@@ -53,7 +53,7 @@ void dumpNode(TidyDoc doc, TidyNode tnod, int indent)
printf("%*.*s%s ", indent, indent, "<", name);
/* walk the attribute list */
for(attr = tidyAttrFirst(child); attr; attr = tidyAttrNext(attr) ) {
- printf(tidyAttrName(attr));
+ printf("%s", tidyAttrName(attr));
tidyAttrValue(attr)?printf("=\"%s\" ",
tidyAttrValue(attr)):printf(" ");
}