mirror of
https://github.com/google/pebble.git
synced 2025-05-01 07:41:41 -04:00
spelling: serialized
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
parent
927251a776
commit
c5495ecbc5
1 changed files with 7 additions and 7 deletions
|
@ -83,7 +83,7 @@ static status_t prv_read_serialized_prefs(SettingsFile *file, const void *key, s
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Returns the length of the data
|
//! Returns the length of the data
|
||||||
//! When done with the prefs, call prv_free_serialzed_prefs()
|
//! When done with the prefs, call prv_free_serialized_prefs()
|
||||||
static int prv_get_serialized_prefs(SettingsFile *file, const uint8_t *app_id, int key_len,
|
static int prv_get_serialized_prefs(SettingsFile *file, const uint8_t *app_id, int key_len,
|
||||||
SerializedNotifPrefs **prefs_out) {
|
SerializedNotifPrefs **prefs_out) {
|
||||||
const unsigned prefs_len = settings_file_get_len(file, app_id, key_len);
|
const unsigned prefs_len = settings_file_get_len(file, app_id, key_len);
|
||||||
|
@ -105,7 +105,7 @@ static int prv_get_serialized_prefs(SettingsFile *file, const uint8_t *app_id, i
|
||||||
return (prefs_len - sizeof(SerializedNotifPrefs));
|
return (prefs_len - sizeof(SerializedNotifPrefs));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prv_free_serialzed_prefs(SerializedNotifPrefs *prefs) {
|
static void prv_free_serialized_prefs(SerializedNotifPrefs *prefs) {
|
||||||
kernel_free(prefs);
|
kernel_free(prefs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ iOSNotifPrefs* ios_notif_pref_db_get_prefs(const uint8_t *app_id, int key_len) {
|
||||||
strncpy(buffer, (const char *)app_id, key_len);
|
strncpy(buffer, (const char *)app_id, key_len);
|
||||||
buffer[key_len] = '\0';
|
buffer[key_len] = '\0';
|
||||||
PBL_LOG(LOG_LEVEL_ERROR, "Could not parse serial data for <%s>", buffer);
|
PBL_LOG(LOG_LEVEL_ERROR, "Could not parse serial data for <%s>", buffer);
|
||||||
prv_free_serialzed_prefs(serialized_prefs);
|
prv_free_serialized_prefs(serialized_prefs);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,12 +172,12 @@ iOSNotifPrefs* ios_notif_pref_db_get_prefs(const uint8_t *app_id, int key_len) {
|
||||||
strncpy(buffer, (const char *)app_id, key_len);
|
strncpy(buffer, (const char *)app_id, key_len);
|
||||||
buffer[key_len] = '\0';
|
buffer[key_len] = '\0';
|
||||||
PBL_LOG(LOG_LEVEL_ERROR, "Could not deserialize data for <%s>", buffer);
|
PBL_LOG(LOG_LEVEL_ERROR, "Could not deserialize data for <%s>", buffer);
|
||||||
prv_free_serialzed_prefs(serialized_prefs);
|
prv_free_serialized_prefs(serialized_prefs);
|
||||||
kernel_free(notif_prefs);
|
kernel_free(notif_prefs);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
prv_free_serialzed_prefs(serialized_prefs);
|
prv_free_serialized_prefs(serialized_prefs);
|
||||||
return notif_prefs;
|
return notif_prefs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -368,7 +368,7 @@ uint32_t ios_notif_pref_db_get_flags(const uint8_t *app_id, int key_len) {
|
||||||
SerializedNotifPrefs *prefs = NULL;
|
SerializedNotifPrefs *prefs = NULL;
|
||||||
prv_get_serialized_prefs(&file, app_id, key_len, &prefs);
|
prv_get_serialized_prefs(&file, app_id, key_len, &prefs);
|
||||||
uint32_t flags = prefs->flags;
|
uint32_t flags = prefs->flags;
|
||||||
prv_free_serialzed_prefs(prefs);
|
prv_free_serialized_prefs(prefs);
|
||||||
prv_file_close_and_unlock(&file);
|
prv_file_close_and_unlock(&file);
|
||||||
return flags;
|
return flags;
|
||||||
}
|
}
|
||||||
|
@ -392,7 +392,7 @@ static bool prv_print_notif_pref_db(SettingsFile *file, SettingsRecordInfo *info
|
||||||
|
|
||||||
// TODO: Print the attributes and actions
|
// TODO: Print the attributes and actions
|
||||||
|
|
||||||
prv_free_serialzed_prefs(serialized_prefs);
|
prv_free_serialized_prefs(serialized_prefs);
|
||||||
prompt_send_response("");
|
prompt_send_response("");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue