diff --git a/cmake/AwsCFlags.cmake b/cmake/AwsCFlags.cmake index b9d2f6446..c0acbba83 100644 --- a/cmake/AwsCFlags.cmake +++ b/cmake/AwsCFlags.cmake @@ -81,7 +81,7 @@ function(aws_set_common_properties target) list(APPEND AWS_C_FLAGS /DAWS_SUPPORT_WIN7=1) endif() - # Set MSVC runtime libary. + # Set MSVC runtime library. # Note: there are other ways of doing this if we bump our CMake minimum to 3.14+ # See: https://cmake.org/cmake/help/latest/policy/CMP0091.html if (AWS_STATIC_MSVC_RUNTIME_LIBRARY OR STATIC_CRT) @@ -257,7 +257,7 @@ function(aws_set_common_properties target) # We do this so that backtraces are more likely to show function names. # We mostly use backtraces to diagnose memory leaks. if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug") - # And dont hide symbols on anything pre GCC 5.0 (Visibility support was not great on older compilers and some libraries didnt annotate visibility - + # And don't hide symbols on anything pre GCC 5.0 (Visibility support was not great on older compilers and some libraries didn't annotate visibility - # looking at you jni, which does not annotate on gcc less than 4.2. Mixing no annotation and hidden symbols leads to unexpected failures.). if (NOT (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_LESS "5.0")) set_target_properties(${target} PROPERTIES C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON) diff --git a/include/aws/common/array_list.h b/include/aws/common/array_list.h index 4cd05bb7d..306acdf70 100644 --- a/include/aws/common/array_list.h +++ b/include/aws/common/array_list.h @@ -212,7 +212,7 @@ AWS_COMMON_API int aws_array_list_ensure_capacity(struct aws_array_list *AWS_RESTRICT list, size_t index); /** - * Copies the the memory pointed to by val into the array at index. If in dynamic mode, the size will grow by a factor + * Copies the memory pointed to by val into the array at index. If in dynamic mode, the size will grow by a factor * of two when the array is full. In static mode, AWS_ERROR_INVALID_INDEX will be raised if the index is past the bounds * of the array. */ diff --git a/include/aws/common/atomics_msvc.inl b/include/aws/common/atomics_msvc.inl index d1f3ba54c..983925a1f 100644 --- a/include/aws/common/atomics_msvc.inl +++ b/include/aws/common/atomics_msvc.inl @@ -69,14 +69,14 @@ AWS_EXTERN_C_BEGIN * This means more permissible memory ordering allowed between stores and loads. * * Thus ARM port will need more hardware fences/barriers to assure developer intent. - * Memory barriers will prevent reordering stores and loads accross them depending on their type + * Memory barriers will prevent reordering stores and loads across them depending on their type * (read write, write only, read only ...) * * For more information about ARM64 memory ordering, * see https://developer.arm.com/documentation/102336/0100/Memory-ordering * For more information about Memory barriers, * see https://developer.arm.com/documentation/102336/0100/Memory-barriers - * For more information about Miscosoft Interensic ARM64 APIs, + * For more information about Microsoft Intrinsic ARM64 APIs, * see https://learn.microsoft.com/en-us/cpp/intrinsics/arm64-intrinsics?view=msvc-170 * Note: wrt _Interlocked[Op]64 is the same for ARM64 and x64 processors */ @@ -96,7 +96,7 @@ typedef long long aws_atomic_impl_int_t; # define AWS_R_BARRIER() __dmb(_ARM64_BARRIER_LD) /* Hardware Write barrier, prevents all memory operations to cross the barrier downwards */ # define AWS_W_BARRIER() __dmb(_ARM64_BARRIER_ST) -/* Software barrier, prevents the compiler from reodering the operations across the barrier */ +/* Software barrier, prevents the compiler from reordering the operations across the barrier */ # define AWS_SW_BARRIER() _ReadWriteBarrier(); #else /* hardware barriers, do nothing on x86 since it has a strong memory model diff --git a/include/aws/common/byte_buf.h b/include/aws/common/byte_buf.h index 594bca22d..a918701d8 100644 --- a/include/aws/common/byte_buf.h +++ b/include/aws/common/byte_buf.h @@ -500,7 +500,7 @@ int aws_byte_buf_append_null_terminator(struct aws_byte_buf *buf); /** * Attempts to increase the capacity of a buffer to the requested capacity * - * If the the buffer's capacity is currently larger than the request capacity, the + * If the buffer's capacity is currently larger than the request capacity, the * function does nothing (no shrink is performed). */ AWS_COMMON_API diff --git a/include/aws/common/cache.h b/include/aws/common/cache.h index dfac0de6d..c9d14ebfd 100644 --- a/include/aws/common/cache.h +++ b/include/aws/common/cache.h @@ -21,7 +21,7 @@ struct aws_cache_vtable { }; /** - * Base stucture for caches, used the linked hash table implementation. + * Base structure for caches, used the linked hash table implementation. */ struct aws_cache { struct aws_allocator *allocator; diff --git a/include/aws/common/cbor.h b/include/aws/common/cbor.h index 077f8e42e..da0bf84d0 100644 --- a/include/aws/common/cbor.h +++ b/include/aws/common/cbor.h @@ -82,7 +82,7 @@ AWS_COMMON_API const char *aws_cbor_type_cstr(enum aws_cbor_type type); /** - * @brief Create a new cbor encoder. Creating a encoder with a temporay buffer. + * @brief Create a new cbor encoder. Creating an encoder with a temporary buffer. * Every aws_cbor_encoder_write_* will encode directly into the buffer to follow the encoded data. * * @param allocator @@ -285,12 +285,12 @@ void aws_cbor_encoder_write_indef_map_start(struct aws_cbor_encoder *encoder); * - If the next element type only accept what expected, `aws_cbor_decoder_pop_next_*` * - If the next element type accept different type, invoke `aws_cbor_decoder_peek_type` first, then based on the type * to invoke corresponding `aws_cbor_decoder_pop_next_*` - * - If the next element type doesn't have corrsponding value, specifically: AWS_CBOR_TYPE_NULL, + * - If the next element type doesn't have corresponding value, specifically: AWS_CBOR_TYPE_NULL, * AWS_CBOR_TYPE_UNDEFINED, AWS_CBOR_TYPE_INF_*_START, AWS_CBOR_TYPE_BREAK, call * `aws_cbor_decoder_consume_next_single_element` to consume it and continues for further decoding. * - To ignore the next data item (the element and the content of it), `aws_cbor_decoder_consume_next_whole_data_item` * - * Note: it's caller's responsibilty to keep the src outlive the decoder. + * Note: it's caller's responsibility to keep the src alive to outlive the decoder. * * @param allocator * @param src The src data to decode from. diff --git a/include/aws/common/hash_table.h b/include/aws/common/hash_table.h index c2cfadd77..b7769837d 100644 --- a/include/aws/common/hash_table.h +++ b/include/aws/common/hash_table.h @@ -103,7 +103,7 @@ typedef uint64_t(aws_hash_fn)(const void *key); * keys, but note that the same type is used for a function that compares * two hash table values in aws_hash_table_eq. * - * Equality functions used in a hash table must be be reflexive (a == a), + * Equality functions used in a hash table must be reflexive (a == a), * symmetric (a == b => b == a), transitive (a == b, b == c => a == c) * and consistent (result does not change with time). */ diff --git a/include/aws/common/json.h b/include/aws/common/json.h index cfda4cf18..b0d1862ce 100644 --- a/include/aws/common/json.h +++ b/include/aws/common/json.h @@ -184,7 +184,7 @@ struct aws_json_value *aws_json_value_get_from_object(const struct aws_json_valu /** * Returns the aws_json_value at the given key. * Note: same as aws_json_value_get_from_object but with key as const char *. - * Prefer this method is you have a key thats already a valid char * as it is likely to be faster. + * Prefer this method if you have a key that's already a valid char * as it is likely to be faster. * @param object The object aws_json_value you want to get the value from. * @param key The key that the aws_json_value is at. Is case sensitive. * @return The aws_json_value at the given key, otherwise NULL. @@ -205,7 +205,7 @@ bool aws_json_value_has_key(const struct aws_json_value *object, struct aws_byte /** * Checks if there is a aws_json_value at the given key. * Note: same as aws_json_value_has_key but with key as const char *. - * Prefer this method is you have a key thats already a valid char * as it is likely to be faster. + * Prefer this method if you have a key that's already a valid char * as it is likely to be faster. * @param object The value aws_json_value you want to check a key in. * @param key The key that you want to check. Is case sensitive. * @return True if a aws_json_value is found. @@ -228,7 +228,7 @@ int aws_json_value_remove_from_object(struct aws_json_value *object, struct aws_ /** * Removes the aws_json_value at the given key. * Note: same as aws_json_value_remove_from_object but with key as const char *. - * Prefer this method is you have a key thats already a valid char * as it is likely to be faster. + * Prefer this method if you have a key that's already a valid char * as it is likely to be faster. * @param object The object aws_json_value you want to remove a aws_json_value in. * @param key The key that the aws_json_value is at. Is case sensitive. * @return AWS_OP_SUCCESS if the aws_json_value was removed. diff --git a/include/aws/common/math.cbmc.inl b/include/aws/common/math.cbmc.inl index e54b22b8b..ca8cf19ca 100644 --- a/include/aws/common/math.cbmc.inl +++ b/include/aws/common/math.cbmc.inl @@ -14,7 +14,7 @@ AWS_EXTERN_C_BEGIN -/* This header does safe operations. Supressing the checks within these functions +/* This header does safe operations. Suppressing the checks within these functions * avoids unnecessary CBMC assertions */ #pragma CPROVER check push diff --git a/include/aws/common/priority_queue.h b/include/aws/common/priority_queue.h index 26b35e991..5dcb6f8fa 100644 --- a/include/aws/common/priority_queue.h +++ b/include/aws/common/priority_queue.h @@ -51,7 +51,7 @@ AWS_EXTERN_C_BEGIN /** * Initializes a priority queue struct for use. This mode will grow memory automatically (exponential model) - * Default size is the inital size of the queue + * Default size is the initial size of the queue * item_size is the size of each element in bytes. Mixing items types is not supported by this API. * pred is the function that will be used to determine priority. */ diff --git a/include/aws/common/private/byte_buf.h b/include/aws/common/private/byte_buf.h index a9eebf034..1756f0f67 100644 --- a/include/aws/common/private/byte_buf.h +++ b/include/aws/common/private/byte_buf.h @@ -18,7 +18,7 @@ AWS_COMMON_API size_t aws_nospec_mask(size_t index, size_t bound); /** * Expand the buffer appropriately to meet the requested capacity. * - * If the the buffer's capacity is currently larger than the request capacity, the + * If the buffer's capacity is currently larger than the request capacity, the * function does nothing (no shrink is performed). */ AWS_COMMON_API @@ -28,7 +28,7 @@ int aws_byte_buf_reserve_smart(struct aws_byte_buf *buffer, size_t requested_cap * Convenience function that attempts to increase the capacity of a buffer relative to the current * length appropriately. * - * If the the buffer's capacity is currently larger than the request capacity, the + * If the buffer's capacity is currently larger than the request capacity, the * function does nothing (no shrink is performed). */ AWS_COMMON_API diff --git a/include/aws/common/private/lookup3.inl b/include/aws/common/private/lookup3.inl index 6095abb46..7956b0ff1 100644 --- a/include/aws/common/private/lookup3.inl +++ b/include/aws/common/private/lookup3.inl @@ -25,7 +25,7 @@ if SELF_TEST is defined. You can use this free for any purpose. It's in the public domain. It has no warranty. You probably want to use hashlittle(). hashlittle() and hashbig() -hash byte arrays. hashlittle() is is faster than hashbig() on +hash byte arrays. hashlittle() is faster than hashbig() on little-endian machines. Intel and AMD are little-endian machines. On second thought, you probably want hashlittle2(), which is identical to hashlittle() except it returns two 32-bit hashes for the price of one. diff --git a/include/aws/common/string.h b/include/aws/common/string.h index 1b969552e..3434fde66 100644 --- a/include/aws/common/string.h +++ b/include/aws/common/string.h @@ -23,7 +23,7 @@ AWS_PUSH_SANE_WARNING_LEVEL * Use the aws_string_bytes function to access the data bytes. A null byte is * always included immediately after the data but not counted in the length, so * that the output of aws_string_bytes can be treated as a C-string in cases - * where none of the the data bytes are null. + * where none of the data bytes are null. * * Note that the fields of this structure are const; this ensures not only that * they cannot be modified, but also that you can't assign the structure using @@ -69,7 +69,7 @@ AWS_EXTERN_C_BEGIN #ifdef AWS_OS_WINDOWS /** - * For windows only. Converts `to_convert` to a windows whcar format (UTF-16) for use with windows OS interop. + * For windows only. Converts `to_convert` to a windows wchar format (UTF-16) for use with windows OS interop. * * Note: `to_convert` is assumed to be UTF-8 or ASCII. * @@ -80,7 +80,7 @@ AWS_COMMON_API struct aws_wstring *aws_string_convert_to_wstring( const struct aws_string *to_convert); /** - * For windows only. Converts `to_convert` to a windows whcar format (UTF-16) for use with windows OS interop. + * For windows only. Converts `to_convert` to a windows wchar format (UTF-16) for use with windows OS interop. * * Note: `to_convert` is assumed to be UTF-8 or ASCII. * @@ -97,7 +97,7 @@ AWS_COMMON_API void aws_wstring_destroy(struct aws_wstring *str); /** - * For windows only. Converts `to_convert` from a windows whcar format (UTF-16) to UTF-8. + * For windows only. Converts `to_convert` from a windows wchar format (UTF-16) to UTF-8. * * Note: `to_convert` is assumed to be wchar already. * @@ -108,7 +108,7 @@ AWS_COMMON_API struct aws_string *aws_string_convert_from_wchar_str( const struct aws_wstring *to_convert); /** - * For windows only. Converts `to_convert` from a windows whcar format (UTF-16) to UTF-8. + * For windows only. Converts `to_convert` from a windows wchar format (UTF-16) to UTF-8. * * Note: `to_convert` is assumed to be wchar already. * @@ -119,7 +119,7 @@ AWS_COMMON_API struct aws_string *aws_string_convert_from_wchar_byte_cursor( const struct aws_byte_cursor *to_convert); /** - * For windows only. Converts `to_convert` from a windows whcar format (UTF-16) to UTF-8. + * For windows only. Converts `to_convert` from a windows wchar format (UTF-16) to UTF-8. * * Note: `to_convert` is assumed to be wchar already. * @@ -285,7 +285,7 @@ int aws_array_list_comparator_string(const void *a, const void *b); * argument that points to constant memory and has data bytes containing the * string literal in the second argument. * - * GCC allows direct initilization of structs with variable length final fields + * GCC allows direct initialization of structs with variable length final fields * However, this might not be portable, so we can do this instead * This will have to be updated whenever the aws_string structure changes */ diff --git a/scripts/appverifier_xml.py b/scripts/appverifier_xml.py index 86b2c3e0e..263c06b07 100755 --- a/scripts/appverifier_xml.py +++ b/scripts/appverifier_xml.py @@ -49,7 +49,7 @@ "0x0B": "AppVerifier could not determine any particular type of corruption for the block. " "Generally means heap points to non-accessible memory area", "0x0C": "AppVerifier could not determine any particular type of corruption for the block. " - "Generally happens if during heap free operation you pass an address that poins to a non-accessible memory area. " + "Generally happens if during heap free operation you pass an address that points to a non-accessible memory area. " "Can also occur with double free situations", "0x0D": "Block of memory is written to after being freed", "0x0E": "Freed block marked as non-accessible had access attempt", @@ -76,7 +76,7 @@ "critical section has not been deleted", "0x202": "A heap allocation contains a critical section, the allocation is freed, and the critical section " "has not been deleted", - "0x203": "Typicaly means a critical section has been initialized more than once. May mean the critical section " + "0x203": "Typically means a critical section has been initialized more than once. May mean the critical section " "or its debug information structure has been corrupted", "0x204": "Memory containing a critical section was freed but the critical section has not been deleted using 'DeleteCriticalSection'", "0x205": "The DebugInfo field of the critical section is pointing to freed memory", @@ -92,8 +92,8 @@ "0x215": "The current thread tries to use a private lock that lives inside another DLL" }, "Memory": { - "0x600": "AppVerifier detects a VirtualFree or a DLL unload with an invalid start adress or size of the memory allocation", - "0x601": "AppVerifier detects a VirtualAlloc call with an invalid start adress or size of the memory allocation", + "0x600": "AppVerifier detects a VirtualFree or a DLL unload with an invalid start address or size of the memory allocation", + "0x601": "AppVerifier detects a VirtualAlloc call with an invalid start address or size of the memory allocation", "0x602": "AppVerifier detects a MapViewOfFile call with an invalid base address or size of the mapping", "0x603": "AppVerifier detects an IsBadXXXPtr call with an invalid address for the memory buffer to be probed", "0x604": "AppVerifier detects an IsBadXXXPtr call for a memory allocation that is free", @@ -107,7 +107,7 @@ "0x60C": "AppVerifier detects a VirtualFree with a non-zero value for the dwSize parameter", "0x60D": "A DLL's entry point function is raising an exception", "0x60E": "A thread function is raising an exception", - "0x60F": "An exception occured during an IsBadXXXPtr call", + "0x60F": "An exception occurred during an IsBadXXXPtr call", "0x610": "AppVerifier detects a VirtualFree call with a NULL first parameter", "0x612": "AppVerifier detects a HeapFree for a block of memory that is actually part of the current thread's stack", "0x613": "AppVerifier detects an UnmapViewOfFile for a block of memory that is actually part of the current thread's stack", @@ -120,13 +120,13 @@ "the VirtualAlloc or VirtualAllocEx function when the region of pages was reserved", "0x61A": "The program is calling UnmapViewOfFile with an IpBaseAddress parameter that is not identical to the value returned" "by a previous call to the MapViewOfFile or MapViewOfFileEx function", - "0x61B": "A callback function in the threadpool thread is rasing an exception", + "0x61B": "A callback function in the threadpool thread is raising an exception", "0x61C": "The application is trying to run code from an address that is non-executable or free", "0x61D": "The application is created an executable heap", "0x61E": "The application is allocating executable memory" }, "SRWLock": { - "0x250": "A thread tried to use SRW lock that is not initalized", + "0x250": "A thread tried to use SRW lock that is not initialized", "0x251": "The SRW lock is being re-initialized", "0x252": "The SRW lock is being released with a wrong release API", "0x253": "The SRW lock is being acquired recursively by the same thread", diff --git a/source/common.c b/source/common.c index 0870325ef..b2e3ccb5e 100644 --- a/source/common.c +++ b/source/common.c @@ -121,7 +121,7 @@ static struct aws_error_info errors[] = { "Invalid thread settings."), AWS_DEFINE_ERROR_INFO_COMMON( AWS_ERROR_THREAD_INSUFFICIENT_RESOURCE, - "Insufficent resources for thread."), + "Insufficient resources for thread."), AWS_DEFINE_ERROR_INFO_COMMON( AWS_ERROR_THREAD_NO_PERMISSIONS, "Insufficient permissions for thread operation."), diff --git a/source/hash_table.c b/source/hash_table.c index bd5d04a3f..50ad2a389 100644 --- a/source/hash_table.c +++ b/source/hash_table.c @@ -34,7 +34,7 @@ static void s_suppress_unused_lookup3_func_warnings(void) { /** * Calculate the hash for the given key. * Ensures a reasonable semantics for null keys. - * Ensures that no object ever hashes to 0, which is the sentinal value for an empty hash element. + * Ensures that no object ever hashes to 0, which is the sentinel value for an empty hash element. */ static uint64_t s_hash_for(struct hash_table_state *state, const void *key) { AWS_PRECONDITION(hash_table_state_is_valid(state)); diff --git a/source/json.c b/source/json.c index 2f1630ea2..db255deff 100644 --- a/source/json.c +++ b/source/json.c @@ -22,7 +22,7 @@ struct aws_json_value *aws_json_value_new_string(struct aws_allocator *allocator } struct aws_json_value *aws_json_value_new_string_from_c_str(struct aws_allocator *allocator, const char *string) { - (void)allocator; /* No need for allocator. It is overriden through hooks. */ + (void)allocator; /* No need for allocator. It is overridden through hooks. */ void *ret_val = cJSON_CreateString(string); return ret_val; } diff --git a/source/memtrace.c b/source/memtrace.c index ee1f291d7..1e0d38fc6 100644 --- a/source/memtrace.c +++ b/source/memtrace.c @@ -161,7 +161,7 @@ static void s_alloc_tracer_track(struct alloc_tracer *tracer, void *ptr, size_t * With optimizations on we cannot trust the stack trace too much. * Memtracer makes an assumption that stack trace will be available in all cases if stack trace api * works. So in the pathological case of stack_depth <= FRAMES_TO_SKIP lets record all the frames we - * have, to at least have an anchor for where allocation is comming from, however inaccurate it is. + * have, to at least have an anchor for where allocation is coming from, however inaccurate it is. */ if (stack_depth <= FRAMES_TO_SKIP) { memcpy((void **)&stack->frames[0], &stack_frames[0], (stack_depth) * sizeof(void *)); diff --git a/source/posix/thread.c b/source/posix/thread.c index 34b5dbe94..796fc08c9 100644 --- a/source/posix/thread.c +++ b/source/posix/thread.c @@ -403,7 +403,7 @@ int aws_thread_launch( s_thread_wrapper_destroy(wrapper); if (options && options->cpu_id >= 0) { /* - * `pthread_create` can fail with an `EINVAL` error or `EDEADLK` on freebasd if the `cpu_id` is + * `pthread_create` can fail with an `EINVAL` error or `EDEADLK` on FreeBSD if the `cpu_id` is * restricted/invalid. Since the pinning to a particular `cpu_id` is supposed to be best-effort, try to * launch a thread again without pinning to a specific cpu_id. */ diff --git a/source/windows/file.c b/source/windows/file.c index e3deead2e..75e7dea79 100644 --- a/source/windows/file.c +++ b/source/windows/file.c @@ -328,7 +328,7 @@ int aws_directory_traverse( aws_string_convert_from_wchar_c_str(allocator, ffd.cFileName); struct aws_byte_cursor name_component_multi_char = aws_byte_cursor_from_string(name_component_multi_char_str); - /* disgard . and .. */ + /* discard . and .. */ char *ascend_mark = ".."; char *cd_mark = "."; struct aws_byte_cursor ascend_mark_cur = aws_byte_cursor_from_c_str(ascend_mark); diff --git a/source/windows/system_info.c b/source/windows/system_info.c index 143eaaa85..36c53e64e 100644 --- a/source/windows/system_info.c +++ b/source/windows/system_info.c @@ -244,7 +244,7 @@ char **aws_backtrace_addr2line(void *const *stack_frames, size_t stack_depth) { void aws_backtrace_print(FILE *fp, void *call_site_data) { struct _EXCEPTION_POINTERS *exception_pointers = call_site_data; if (exception_pointers) { - fprintf(fp, "** Exception 0x%x occured **\n", exception_pointers->ExceptionRecord->ExceptionCode); + fprintf(fp, "** Exception 0x%x occurred **\n", exception_pointers->ExceptionRecord->ExceptionCode); } if (!s_init_dbghelp()) { diff --git a/source/xml_parser.c b/source/xml_parser.c index 3be597a87..138137e09 100644 --- a/source/xml_parser.c +++ b/source/xml_parser.c @@ -550,7 +550,7 @@ int s_node_next_sibling(struct aws_xml_parser *parser) { * Takes xml encoded string and pushes unescaped string to the out buffer. * Note: xml allows escaping chars as follows: * - &name; with 5 possible values corresponding to <, >, &, " and ' - * - &#n; where n is a codepoint representing anyunicode character. (codepoint can start with x to indicate its a hex + * - &#n; where n is a codepoint representing any unicode character. (codepoint can start with x to indicate it's a hex * codepoint) Unescaped result will always be either the same length (nothing to unescape) or shorter. */ static int s_build_unescaped_buffer(struct aws_byte_cursor data, struct aws_byte_buf *out) { diff --git a/tests/encoding_test.c b/tests/encoding_test.c index 188ca0be2..7babbde4a 100644 --- a/tests/encoding_test.c +++ b/tests/encoding_test.c @@ -72,7 +72,7 @@ static int s_run_hex_encoding_test_case( ASSERT_INT_EQUALS( (unsigned char)*(allocation.buffer + output_len + 1), (unsigned char)0xdd, - "Write should not have occurred after the start of the buffer."); + "Write should not have occurred after the end of the buffer."); aws_byte_buf_clean_up(&allocation); return 0; @@ -377,7 +377,7 @@ static int s_run_base64_encoding_test_case( ASSERT_INT_EQUALS( (unsigned char)*(allocation.buffer + output_len + 1), (unsigned char)0xdd, - "Write should not have occurred after the start of the buffer."); + "Write should not have occurred after the end of the buffer."); aws_byte_buf_clean_up(&allocation); @@ -1084,7 +1084,7 @@ static int s_run_hex_encoding_append_dynamic_test_case( ASSERT_INT_EQUALS( (unsigned char)*(dest.buffer + i), (unsigned char)0xdd, - "Write should not have occurred before the the encoding's starting position."); + "Write should not have occurred before the encoding's starting position."); } for (size_t i = starting_offset + output_size; i < dest.capacity; ++i) { @@ -1518,7 +1518,7 @@ static int s_text_is_valid_utf8_callback(struct aws_allocator *allocator, void * ASSERT_FAILS(aws_decode_utf8(aws_byte_cursor_from_buf(&all_good_text), &with_validation_callback_always_fails)); aws_byte_buf_clean_up(&all_good_text); - /* Check the illegal test cases with always true callbck, it should still fail*/ + /* Check the illegal test cases with always true callback, it should still fail*/ for (size_t i = 0; i < AWS_ARRAY_SIZE(s_illegal_utf8_examples); ++i) { struct utf8_example example = s_illegal_utf8_examples[i]; printf("illegal example [%zu]: %s\n", i, example.name); diff --git a/tests/error_test.c b/tests/error_test.c index 409dc5a34..9ad9c2107 100644 --- a/tests/error_test.c +++ b/tests/error_test.c @@ -257,7 +257,7 @@ static int s_unknown_error_code_in_slot_test_fn(struct aws_allocator *allocator, aws_raise_error(test_error_2.error_code + 1); error = aws_last_error(); - /* error code should still propogate */ + /* error code should still propagate */ ASSERT_INT_EQUALS( test_error_2.error_code + 1, error, "Expected error code %d, but was %d", test_error_2.error_code + 1, error); @@ -296,7 +296,7 @@ static int s_unknown_error_code_no_slot_test_fn(struct aws_allocator *allocator, int non_slotted_error_code = 3000; aws_raise_error(non_slotted_error_code); error = aws_last_error(); - /* error code should still propogate */ + /* error code should still propagate */ ASSERT_INT_EQUALS( non_slotted_error_code, error, "Expected error code %d, but was %d", non_slotted_error_code, error); @@ -335,7 +335,7 @@ static int s_unknown_error_code_range_too_large_test_fn(struct aws_allocator *al int oor_error_code = 10001; aws_raise_error(oor_error_code); error = aws_last_error(); - /* error code should still propogate */ + /* error code should still propagate */ ASSERT_INT_EQUALS(oor_error_code, error, "Expected error code %d, but was %d", oor_error_code, error); /* string should be invalid though */ diff --git a/verification/cbmc/proofs/aws_priority_queue_s_sift_either/aws_priority_queue_s_sift_either_harness.c b/verification/cbmc/proofs/aws_priority_queue_s_sift_either/aws_priority_queue_s_sift_either_harness.c index b177d9d17..3d89b6900 100644 --- a/verification/cbmc/proofs/aws_priority_queue_s_sift_either/aws_priority_queue_s_sift_either_harness.c +++ b/verification/cbmc/proofs/aws_priority_queue_s_sift_either/aws_priority_queue_s_sift_either_harness.c @@ -25,7 +25,7 @@ void aws_priority_queue_s_sift_either_harness() { /* Ensuring that just the root cell is correctly allocated is * not enough, as the swap requires that both the swapped * cells are correctly allocated. Therefore, if swap is to - * not be overriden, I have to ensure that all of the root + * not be overridden, I have to ensure that all of the root * descendants at least are correctly allocated. For now it is * ensured that all of them are. */ size_t i; diff --git a/verification/cbmc/proofs/aws_priority_queue_s_sift_up/aws_priority_queue_s_sift_up_harness.c b/verification/cbmc/proofs/aws_priority_queue_s_sift_up/aws_priority_queue_s_sift_up_harness.c index fd0c6b08b..6b9d1bf3a 100644 --- a/verification/cbmc/proofs/aws_priority_queue_s_sift_up/aws_priority_queue_s_sift_up_harness.c +++ b/verification/cbmc/proofs/aws_priority_queue_s_sift_up/aws_priority_queue_s_sift_up_harness.c @@ -25,7 +25,7 @@ void aws_priority_queue_s_sift_up_harness() { /* Ensuring that just the root cell is correctly allocated is * not enough, as the swap requires that both the swapped * cells are correctly allocated. Therefore, if swap is to - * not be overriden, I have to ensure that all of the root + * not be overridden, I have to ensure that all of the root * descendants at least are correctly allocated. For now it is * ensured that all of them are. */ size_t i; diff --git a/verification/cbmc/stubs/aws_array_list_swap_override.c b/verification/cbmc/stubs/aws_array_list_swap_override.c index eb218b0e0..eb41ca951 100644 --- a/verification/cbmc/stubs/aws_array_list_swap_override.c +++ b/verification/cbmc/stubs/aws_array_list_swap_override.c @@ -8,7 +8,7 @@ * * We override aws_array_list_swap because mem_swap makes CBMC * struggle (because of the many memcpys) and because the - * array_list_get_at in before the mem_swap are unneccessary if we + * array_list_get_at in before the mem_swap are unnecessary if we * stub out mem_swap. Instead we add a havoc assumption on the two * swapped byted to ensure that no assertion on the values of the two * cells is made afterwards. diff --git a/verification/cbmc/stubs/aws_hash_table_no_slots_override.c b/verification/cbmc/stubs/aws_hash_table_no_slots_override.c index 8013a266f..9cf8ebf34 100644 --- a/verification/cbmc/stubs/aws_hash_table_no_slots_override.c +++ b/verification/cbmc/stubs/aws_hash_table_no_slots_override.c @@ -143,7 +143,7 @@ int aws_hash_table_create( * -DHASH_TABLE_FIND_ELEMENT_GENERATOR=the_generator_fn, where the_generator_fn has signature: * the_generator_fnconst struct aws_hash_table *map, const void *key, struct aws_hash_element *p_elem). * - * NOTE: If you want a version of aws_hash_table_find() that that ensures that the table actually has the found value + * NOTE: If you want a version of aws_hash_table_find() that ensures that the table actually has the found value * when find returns success, that can be found in aws_hash_table_find_override.c */ #ifdef HASH_TABLE_FIND_ELEMENT_GENERATOR