From 543a8eb5f93050ea111a085813a8c75cbf3e3099 Mon Sep 17 00:00:00 2001 From: Tobias Stoeckmann Date: Sun, 6 Mar 2022 16:07:36 +0100 Subject: [PATCH] Fix typos Mostly found with codespell and during code review. --- CMakeLists.txt | 2 +- bench/README.bench.md | 2 +- doc/Doxyfile.in | 4 ++-- linkhash.c | 2 +- printbuf.c | 4 ++-- printbuf.h | 2 +- tests/test_json_pointer.c | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ba3550bd..98b7eda2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -156,7 +156,7 @@ check_include_file(xlocale.h HAVE_XLOCALE_H) if (HAVE_INTTYPES_H) # Set a json-c specific var to stamp into json_config.h - # in a way that hopefull ywon't conflict with other + # in a way that hopefully won't conflict with other # projects that use json-c. set(JSON_C_HAVE_INTTYPES_H 1) endif() diff --git a/bench/README.bench.md b/bench/README.bench.md index 62c6908a..c37cb1a6 100644 --- a/bench/README.bench.md +++ b/bench/README.bench.md @@ -70,7 +70,7 @@ Issues Using heaptrack, and analyzing the histogram, only shows ~2.6MB ``` heaptrack ./json_parse -n canada.json - heaptrack --analyze heaptrack*gz -H histgram.out + heaptrack --analyze heaptrack*gz -H histogram.out awk ' { s=$1; count=$2; ru=(int((s+ 15) / 16)) * 16; wasted = ((ru-s)*count); print s, count, ru-s, wasted; total=total+wasted} END { print "Total: ", total }' histogram.out ``` diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index f064f604..106ed897 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -1646,8 +1646,8 @@ EXTRA_PACKAGES = # Note: Only use a user-defined header if you know what you are doing! The # following commands have a special meaning inside the header: $title, # $datetime, $date, $doxygenversion, $projectname, $projectnumber, -# $projectbrief, $projectlogo. Doxygen will replace $title with the empy string, -# for the replacement values of the other commands the user is refered to +# $projectbrief, $projectlogo. Doxygen will replace $title with the empty string, +# for the replacement values of the other commands the user is referred to # HTML_HEADER. # This tag requires that the tag GENERATE_LATEX is set to YES. diff --git a/linkhash.c b/linkhash.c index 6105160c..b9ca1d17 100644 --- a/linkhash.c +++ b/linkhash.c @@ -67,7 +67,7 @@ int lh_ptr_equal(const void *k1, const void *k2) * hashlittle from lookup3.c, by Bob Jenkins, May 2006, Public Domain. * http://burtleburtle.net/bob/c/lookup3.c * minor modifications to make functions static so no symbols are exported - * minor mofifications to compile with -Werror + * minor modifications to compile with -Werror */ /* diff --git a/printbuf.c b/printbuf.c index 245ad878..1e737439 100644 --- a/printbuf.c +++ b/printbuf.c @@ -136,12 +136,12 @@ int sprintbuf(struct printbuf *p, const char *msg, ...) int size; char buf[128]; - /* user stack buffer first */ + /* use stack buffer first */ va_start(ap, msg); size = vsnprintf(buf, 128, msg, ap); va_end(ap); /* if string is greater than stack buffer, then use dynamic string - * with vasprintf. Note: some implementation of vsnprintf return -1 + * with vasprintf. Note: some implementations of vsnprintf return -1 * if output is truncated whereas some return the number of bytes that * would have been written - this code handles both cases. */ diff --git a/printbuf.h b/printbuf.h index 9b338021..f3133aeb 100644 --- a/printbuf.h +++ b/printbuf.h @@ -15,7 +15,7 @@ /** * @file - * @brief Internal string buffer handing. Unless you're writing a + * @brief Internal string buffer handling. Unless you're writing a * json_object_to_json_string_fn implementation for use with * json_object_set_serializer() direct use of this is not * recommended. diff --git a/tests/test_json_pointer.c b/tests/test_json_pointer.c index 3174c87e..4ac78cb8 100644 --- a/tests/test_json_pointer.c +++ b/tests/test_json_pointer.c @@ -124,7 +124,7 @@ static void test_example_get(void) json_object_put(jo1); } -/* I'm not too happy with the RFC example to test the recusion of the json_pointer_get() function */ +/* I'm not too happy with the RFC example to test the recursion of the json_pointer_get() function */ static void test_recursion_get(void) { struct json_object *jo2, *jo1 = json_tokener_parse(rec_input_json_str); -- 2.39.5