Skip to content

Commit

Permalink
samples: nvs: improve one output message, fix another one
Browse files Browse the repository at this point in the history
Fix the Id of the longarray message.

Also change the display of the "Address" entry to use "Id" instead of
"Entry" to be consistent the other displayed entries.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
  • Loading branch information
aurel32 authored and nashif committed Sep 17, 2018
1 parent 9fa1af6 commit 8ec537d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions samples/subsys/nvs/src/main.c
Expand Up @@ -87,7 +87,7 @@ void main(void)
*/
rc = nvs_read(&fs, ADDRESS_ID, &buf, sizeof(buf));
if (rc > 0) { /* item was found, show it */
printk("Entry: %d, Address: %s\n", ADDRESS_ID, buf);
printk("Id: %d, Address: %s\n", ADDRESS_ID, buf);
} else {/* item was not found, add it */
strcpy(buf, "192.168.1.1");
printk("No address found, adding %s at id %d\n", buf,
Expand Down Expand Up @@ -166,7 +166,7 @@ void main(void)
/* entry was not found, add it if reboot_counter = 0*/
if (reboot_counter == 0) {
printk("Longarray not found, adding it as id %d\n",
STRING_ID);
LONG_ID);
for (int n = 0; n < sizeof(longarray); n++) {
longarray[n] = n;
}
Expand Down

0 comments on commit 8ec537d

Please sign in to comment.