summaryrefslogtreecommitdiff
path: root/apps/plugins/keybox.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/keybox.c')
-rw-r--r--apps/plugins/keybox.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/plugins/keybox.c b/apps/plugins/keybox.c
index 6c59470fa4..733c6e95cd 100644
--- a/apps/plugins/keybox.c
+++ b/apps/plugins/keybox.c
@@ -190,12 +190,12 @@ static void add_entry(int selected_item)
190 190
191 rb->splash(HZ, "Enter title"); 191 rb->splash(HZ, "Enter title");
192 pw_list.entries[i].title[0] = '\0'; 192 pw_list.entries[i].title[0] = '\0';
193 if (rb->kbd_input(pw_list.entries[i].title, FIELD_LEN)) 193 if (rb->kbd_input(pw_list.entries[i].title, FIELD_LEN) < 0)
194 return; 194 return;
195 195
196 rb->splash(HZ, "Enter name"); 196 rb->splash(HZ, "Enter name");
197 pw_list.entries[i].name[0] = '\0'; 197 pw_list.entries[i].name[0] = '\0';
198 if (rb->kbd_input(pw_list.entries[i].name, FIELD_LEN)) 198 if (rb->kbd_input(pw_list.entries[i].name, FIELD_LEN) < 0)
199 { 199 {
200 pw_list.entries[i].title[0] = '\0'; 200 pw_list.entries[i].title[0] = '\0';
201 return; 201 return;
@@ -203,7 +203,7 @@ static void add_entry(int selected_item)
203 203
204 rb->splash(HZ, "Enter password"); 204 rb->splash(HZ, "Enter password");
205 pw_list.entries[i].password[0] = '\0'; 205 pw_list.entries[i].password[0] = '\0';
206 if (rb->kbd_input(pw_list.entries[i].password, FIELD_LEN)) 206 if (rb->kbd_input(pw_list.entries[i].password, FIELD_LEN) < 0)
207 { 207 {
208 pw_list.entries[i].title[0] = '\0'; 208 pw_list.entries[i].title[0] = '\0';
209 pw_list.entries[i].name[0] = '\0'; 209 pw_list.entries[i].name[0] = '\0';
@@ -508,11 +508,11 @@ static int enter_pw(char *pw_buf, size_t buflen, bool new_pw)
508 if (new_pw) 508 if (new_pw)
509 { 509 {
510 rb->splash(HZ, "Enter new master password"); 510 rb->splash(HZ, "Enter new master password");
511 if (rb->kbd_input(buf[0], sizeof(buf[0]))) 511 if (rb->kbd_input(buf[0], sizeof(buf[0])) < 0)
512 return -1; 512 return -1;
513 513
514 rb->splash(HZ, "Confirm master password"); 514 rb->splash(HZ, "Confirm master password");
515 if (rb->kbd_input(buf[1], sizeof(buf[1]))) 515 if (rb->kbd_input(buf[1], sizeof(buf[1])) < 0)
516 return -1; 516 return -1;
517 517
518 if (rb->strcmp(buf[0], buf[1])) 518 if (rb->strcmp(buf[0], buf[1]))
@@ -529,7 +529,7 @@ static int enter_pw(char *pw_buf, size_t buflen, bool new_pw)
529 } 529 }
530 530
531 rb->splash(HZ, "Enter master password"); 531 rb->splash(HZ, "Enter master password");
532 if (rb->kbd_input(pw_buf, buflen)) 532 if (rb->kbd_input(pw_buf, buflen) < 0)
533 return -1; 533 return -1;
534 hash_pw(&pwhash); 534 hash_pw(&pwhash);
535 return 0; 535 return 0;