Skip to content

Commit

Permalink
make helper function obviously a helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
graebm committed Oct 12, 2023
1 parent d3d845a commit 7f8efed
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions source/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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(
Expand All @@ -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) {
Expand Down

0 comments on commit 7f8efed

Please sign in to comment.