@@ -844,7 +844,7 @@ int aws_s3_calculate_client_optimal_range_size(
844844 uint32_t max_connections ,
845845 uint64_t * out_client_optimal_range_size ) {
846846
847- AWS_PRECONDITION (out_client_optimal_range_size );
847+ AWS_ERROR_PRECONDITION (out_client_optimal_range_size );
848848
849849 /* Validate input parameters */
850850 if (memory_limit_in_bytes == 0 || max_connections == 0 ) {
@@ -898,7 +898,7 @@ int aws_s3_calculate_request_optimal_range_size(
898898 uint64_t estimated_object_stored_part_size ,
899899 uint64_t * out_request_optimal_range_size ) {
900900
901- AWS_PRECONDITION (out_request_optimal_range_size );
901+ AWS_ERROR_PRECONDITION (out_request_optimal_range_size );
902902
903903 /* Validate input parameters */
904904 if (client_optimal_range_size == 0 ) {
@@ -944,7 +944,7 @@ static bool s_is_quote_or_space_char(uint8_t c) {
944944
945945int aws_s3_extract_parts_from_etag (struct aws_byte_cursor etag_header_value , uint32_t * out_num_parts ) {
946946
947- AWS_PRECONDITION (out_num_parts );
947+ AWS_ERROR_PRECONDITION (out_num_parts );
948948 /* Strip quotes if present (ETags often come wrapped in quotes) */
949949 struct aws_byte_cursor etag_cursor = aws_byte_cursor_trim_pred (& etag_header_value , s_is_quote_or_space_char );
950950
@@ -964,7 +964,10 @@ int aws_s3_extract_parts_from_etag(struct aws_byte_cursor etag_header_value, uin
964964 while (aws_byte_cursor_next_split (& remaining_cursor , '-' , & substr )) {
965965 split_count ++ ;
966966 if (split_count == 2 ) {
967- /* The ETag should follow the pattern <hash>-<parts_count>, so the second part is the parts count. */
967+ /**
968+ * The ETag should follow the pattern <hash>-<parts_count>, so the second part is the parts count.
969+ * The S3 ETag will not have `-` in the hash value, as it's a HEX string.
970+ **/
968971 parts_count = substr ;
969972 }
970973 if (split_count > 2 ) {
0 commit comments