From 0af48bf2c573780997ba54d8c2c9d9b242d25852 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 28 Jan 2025 11:36:30 -0500 Subject: [PATCH] spelling: attribute Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../normal/contacts/attributes_address.h | 8 ++++---- .../normal/notifications/ancs/ancs_filtering.c | 6 +++--- .../services/normal/timeline/attribute_group.c | 16 ++++++++-------- .../normal/timeline/attributes_actions.h | 8 ++++---- .../services/normal/timeline/timeline_actions.c | 2 +- tests/fw/comm/test_ancs.c | 2 +- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/fw/services/normal/contacts/attributes_address.h b/src/fw/services/normal/contacts/attributes_address.h index 5615feeb..2789d4b0 100644 --- a/src/fw/services/normal/contacts/attributes_address.h +++ b/src/fw/services/normal/contacts/attributes_address.h @@ -69,8 +69,8 @@ size_t attributes_address_get_buffer_size(uint8_t num_attributes, const uint8_t *attributes_per_address, size_t required_size_for_strings); -//! Initializes an AttrbuteList and AddressList -//! @param attr_list The AttrbuteList to initialize +//! Initializes an AttributeList and AddressList +//! @param attr_list The AttributeList to initialize //! @param addr_list The AddressList to initialize //! @param buffer The buffer to hold the list of attributes and address //! @param num_attributes number of attributes @@ -85,7 +85,7 @@ void attributes_address_init(AttributeList *attr_list, const uint8_t *attributes_per_address); //! Fills an AttributeList and AddressList from serialized data -//! @param attr_list The AttrbuteList to fill +//! @param attr_list The AttributeList to fill //! @param addr_list The AddressList to fill //! @param buffer The buffer which holds the list of attributes and address //! @param buf_end A pointer to the end of the buffer @@ -103,7 +103,7 @@ size_t attributes_address_get_serialized_payload_size(AttributeList *list, AddressList *addr_list); //! Serializes an attribute list and address list into a buffer -//! @param attr_list The AttrbuteList to serialize +//! @param attr_list The AttributeList to serialize //! @param addr_list The AddressList to serialize //! @param buffer a pointer to the buffer to write to //! @param buffer_size the size of the buffer in bytes diff --git a/src/fw/services/normal/notifications/ancs/ancs_filtering.c b/src/fw/services/normal/notifications/ancs/ancs_filtering.c index f76344e2..4c134259 100644 --- a/src/fw/services/normal/notifications/ancs/ancs_filtering.c +++ b/src/fw/services/normal/notifications/ancs/ancs_filtering.c @@ -36,16 +36,16 @@ void ancs_filtering_record_app(iOSNotifPrefs **notif_prefs, // stored. iOSNotifPrefs *app_notif_prefs = *notif_prefs; - const int num_existing_attribtues = app_notif_prefs ? app_notif_prefs->attr_list.num_attributes : + const int num_existing_attributes = app_notif_prefs ? app_notif_prefs->attr_list.num_attributes : 0; AttributeList new_attr_list; - attribute_list_init_list(num_existing_attribtues, &new_attr_list); + attribute_list_init_list(num_existing_attributes, &new_attr_list); bool list_dirty = false; // Copy over all the existing attributes to our new list if (app_notif_prefs) { - for (int i = 0; i < num_existing_attribtues; i++) { + for (int i = 0; i < num_existing_attributes; i++) { new_attr_list.attributes[i] = app_notif_prefs->attr_list.attributes[i]; } } diff --git a/src/fw/services/normal/timeline/attribute_group.c b/src/fw/services/normal/timeline/attribute_group.c index 8f285f79..e7375732 100644 --- a/src/fw/services/normal/timeline/attribute_group.c +++ b/src/fw/services/normal/timeline/attribute_group.c @@ -235,19 +235,19 @@ static bool prv_deserialize_group_element(AttributeGroupType type, } for (int i = 0; i < num_group_type_elements; i++) { - AttributeList *group_type_element_attribtue_list; + AttributeList *group_type_element_attribute_list; if (type == AttributeGroupType_Action) { - group_type_element_attribtue_list = prv_deserialize_action( + group_type_element_attribute_list = prv_deserialize_action( &((TimelineItemActionGroup *)group_ptr)->actions[i], &cursor, payload_end, buffer, buf_end); } else { - group_type_element_attribtue_list = prv_deserialize_address( + group_type_element_attribute_list = prv_deserialize_address( &((AddressList *)group_ptr)->addresses[i], &cursor, payload_end, buffer, buf_end); } if (!attribute_deserialize_list((char**)&buffer, (char *)buf_end, &cursor, - payload_end, *group_type_element_attribtue_list)) { + payload_end, *group_type_element_attribute_list)) { return false; } } @@ -354,17 +354,17 @@ static uint8_t* prv_serialize_group_element(AttributeGroupType type, } for (int i = 0; i < num_group_type_elements; i++) { - AttributeList *group_type_element_attribtue_list; + AttributeList *group_type_element_attribute_list; if (type == AttributeGroupType_Action) { - group_type_element_attribtue_list = prv_serialize_action( + group_type_element_attribute_list = prv_serialize_action( &((TimelineItemActionGroup *)group_ptr)->actions[i], &buffer); } else { - group_type_element_attribtue_list = prv_serialize_address( + group_type_element_attribute_list = prv_serialize_address( &((AddressList *)group_ptr)->addresses[i], &buffer); } PBL_ASSERTN(buffer <= buf_end); - buffer += attribute_list_serialize(group_type_element_attribtue_list, + buffer += attribute_list_serialize(group_type_element_attribute_list, buffer, buf_end); } diff --git a/src/fw/services/normal/timeline/attributes_actions.h b/src/fw/services/normal/timeline/attributes_actions.h index f8aa1a09..d9e28e74 100644 --- a/src/fw/services/normal/timeline/attributes_actions.h +++ b/src/fw/services/normal/timeline/attributes_actions.h @@ -56,8 +56,8 @@ size_t attributes_actions_get_required_buffer_size(uint8_t num_attributes, size_t attributes_actions_get_buffer_size(AttributeList *attr_list, TimelineItemActionGroup *action_group); -//! Initializes an AttrbuteList and ActionGroup -//! @param attr_list The AttrbuteList to initialize +//! Initializes an AttributeList and ActionGroup +//! @param attr_list The AttributeList to initialize //! @param action_group The ActionGroup to initialize //! @param buffer The buffer to hold the list of attributes and actions //! @param num_attributes number of attributes @@ -72,7 +72,7 @@ void attributes_actions_init(AttributeList *attr_list, const uint8_t *attributes_per_action); //! Fills an AttributeList and ActionGroup from serialized data -//! @param attr_list The AttrbuteList to fill +//! @param attr_list The AttributeList to fill //! @param action_group The ActionGroup to fill //! @param buffer The buffer which holds the list of attributes and actions //! @param buf_end A pointer to the end of the buffer @@ -90,7 +90,7 @@ size_t attributes_actions_get_serialized_payload_size(AttributeList *list, TimelineItemActionGroup *action_group); //! Serializes an attribute list and action group into a buffer -//! @param attr_list The AttrbuteList to serialize +//! @param attr_list The AttributeList to serialize //! @param action_group The ActionGroup to serialize //! @param buffer a pointer to the buffer to write to //! @param buffer_size the size of the buffer in bytes diff --git a/src/fw/services/normal/timeline/timeline_actions.c b/src/fw/services/normal/timeline/timeline_actions.c index d49f7f7c..966e7ce4 100644 --- a/src/fw/services/normal/timeline/timeline_actions.c +++ b/src/fw/services/normal/timeline/timeline_actions.c @@ -550,7 +550,7 @@ static ActionResultData *prv_invoke_remote_action(ActionMenu *action_menu, // To give the iOS app some context (let it do lookups), give it all the // info about the notification - // Copy every attribtue from the notification and add: + // Copy every attribute from the notification and add: // - Timestamp attribute const int num_extra_attributes = 1; const int num_attributes = pin->attr_list.num_attributes + num_extra_attributes; diff --git a/tests/fw/comm/test_ancs.c b/tests/fw/comm/test_ancs.c index 22b02ec1..f9001176 100644 --- a/tests/fw/comm/test_ancs.c +++ b/tests/fw/comm/test_ancs.c @@ -353,7 +353,7 @@ void test_ancs__should_handle_small_and_large_messages(void) { cl_assert_equal_i(fake_kernel_services_notifications_ancs_notifications_count(), 4 + 4 + 4); } -void test_ancs__should_handle_message_size_attribtue(void) { +void test_ancs__should_handle_message_size_attribute(void) { prv_send_notification((uint8_t *)&s_message_size_attr_dict); cl_assert_equal_i(s_num_requested_notif_attributes, 1); cl_assert_equal_i(s_num_ds_notifications_received, 1);