Skip to content

Commit

Permalink
Make it const.
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanHenson committed Oct 6, 2023
1 parent 5c1917e commit bc220a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions include/aws/common/system_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ void aws_system_environment_destroy(struct aws_system_environment *env);


AWS_COMMON_API
struct aws_byte_cursor aws_system_environment_get_virtualization_vendor(struct aws_system_environment *env);
struct aws_byte_cursor aws_system_environment_get_virtualization_vendor(const struct aws_system_environment *env);

AWS_COMMON_API
struct aws_byte_cursor aws_system_environment_get_virtualization_product_name(struct aws_system_environment *env);
struct aws_byte_cursor aws_system_environment_get_virtualization_product_name(const struct aws_system_environment *env);

AWS_COMMON_API
size_t aws_system_environment_get_processor_count(struct aws_system_environment *env);
Expand Down
5 changes: 2 additions & 3 deletions source/system_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,14 @@ void aws_system_environment_destroy(struct aws_system_environment *env) {
aws_system_environment_destroy_platform_impl(env);
aws_mem_release(env->allocator, env);
}

}

struct aws_byte_cursor aws_system_environment_get_virtualization_vendor(struct aws_system_environment *env) {
struct aws_byte_cursor aws_system_environment_get_virtualization_vendor(const struct aws_system_environment *env) {
struct aws_byte_cursor vendor_string = aws_byte_cursor_from_buf(&env->virtualization_vendor);
return aws_byte_cursor_trim_pred(&vendor_string, aws_char_is_space);
}

struct aws_byte_cursor aws_system_environment_get_virtualization_product_name(struct aws_system_environment *env) {
struct aws_byte_cursor aws_system_environment_get_virtualization_product_name(const struct aws_system_environment *env) {
struct aws_byte_cursor product_name_str = aws_byte_cursor_from_buf(&env->product_name);
return aws_byte_cursor_trim_pred(&product_name_str, aws_char_is_space);
}
Expand Down

0 comments on commit bc220a4

Please sign in to comment.