From 7f8efed2a7eed2a5cd5578ef3f2544e4973afd94 Mon Sep 17 00:00:00 2001 From: Michael Graeb Date: Thu, 12 Oct 2023 22:26:25 +0000 Subject: [PATCH] make helper function obviously a helper function --- source/file.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/file.c b/source/file.c index f17d9d07a..504e547f5 100644 --- a/source/file.c +++ b/source/file.c @@ -44,7 +44,8 @@ FILE *aws_fopen(const char *file_path, const char *mode) { return file; } -static int s_byte_buf_init_from_file( +/* Helper function used by aws_byte_buf_init_from_file() and aws_byte_buf_init_from_file_with_size_hint() */ +static int s_byte_buf_init_from_file_impl( struct aws_byte_buf *out_buf, struct aws_allocator *alloc, const char *filename, @@ -142,7 +143,7 @@ static int s_byte_buf_init_from_file( } int aws_byte_buf_init_from_file(struct aws_byte_buf *out_buf, struct aws_allocator *alloc, const char *filename) { - return s_byte_buf_init_from_file(out_buf, alloc, filename, true /*use_file_size_as_hint*/, 0 /*size_hint*/); + return s_byte_buf_init_from_file_impl(out_buf, alloc, filename, true /*use_file_size_as_hint*/, 0 /*size_hint*/); } int aws_byte_buf_init_from_file_with_size_hint( @@ -151,7 +152,7 @@ int aws_byte_buf_init_from_file_with_size_hint( const char *filename, size_t size_hint) { - return s_byte_buf_init_from_file(out_buf, alloc, filename, false /*use_file_size_as_hint*/, size_hint); + return s_byte_buf_init_from_file_impl(out_buf, alloc, filename, false /*use_file_size_as_hint*/, size_hint); } bool aws_is_any_directory_separator(char value) {