diff options
author | Peter Pentchev <roam@ringlet.net> | 2016-07-07 11:12:08 +0300 |
---|---|---|
committer | Peter Pentchev <roam@ringlet.net> | 2016-07-07 11:12:08 +0300 |
commit | 3b30bf540e987f33267bb75d73212db29e99f9d1 (patch) | |
tree | 00203f2eae9c7ab367bc44a477b76eb213c21df9 | |
parent | a31edc47153a79920f295b41a8ab9238a7f93cb2 (diff) | |
download | libarchive-3b30bf540e987f33267bb75d73212db29e99f9d1.tar.gz |
Fix a typo in a struct member: candiate -> candidate.
-rw-r--r-- | libarchive/archive_read_add_passphrase.c | 22 | ||||
-rw-r--r-- | libarchive/archive_read_private.h | 2 |
2 files changed, 12 insertions, 12 deletions
diff --git a/libarchive/archive_read_add_passphrase.c b/libarchive/archive_read_add_passphrase.c index f67f1ebc..cf821b5d 100644 --- a/libarchive/archive_read_add_passphrase.c +++ b/libarchive/archive_read_add_passphrase.c @@ -125,7 +125,7 @@ void __archive_read_reset_passphrase(struct archive_read *a) { - a->passphrases.candiate = -1; + a->passphrases.candidate = -1; } /* @@ -137,31 +137,31 @@ __archive_read_next_passphrase(struct archive_read *a) struct archive_read_passphrase *p; const char *passphrase; - if (a->passphrases.candiate < 0) { + if (a->passphrases.candidate < 0) { /* Count out how many passphrases we have. */ int cnt = 0; for (p = a->passphrases.first; p != NULL; p = p->next) cnt++; - a->passphrases.candiate = cnt; + a->passphrases.candidate = cnt; p = a->passphrases.first; - } else if (a->passphrases.candiate > 1) { + } else if (a->passphrases.candidate > 1) { /* Rotate a passphrase list. */ - a->passphrases.candiate--; + a->passphrases.candidate--; p = remove_passphrases_from_head(a); add_passphrase_to_tail(a, p); - /* Pick a new passphrase candiate up. */ + /* Pick a new passphrase candidate up. */ p = a->passphrases.first; - } else if (a->passphrases.candiate == 1) { - /* This case is that all cadiates failed to decryption. */ - a->passphrases.candiate = 0; + } else if (a->passphrases.candidate == 1) { + /* This case is that all candidates failed to decrypt. */ + a->passphrases.candidate = 0; if (a->passphrases.first->next != NULL) { /* Rotate a passphrase list. */ p = remove_passphrases_from_head(a); add_passphrase_to_tail(a, p); } p = NULL; - } else /* There is no passphrase candaite. */ + } else /* There is no passphrase candidate. */ p = NULL; if (p != NULL) @@ -177,7 +177,7 @@ __archive_read_next_passphrase(struct archive_read *a) if (p == NULL) return (NULL); insert_passphrase_to_head(a, p); - a->passphrases.candiate = 1; + a->passphrases.candidate = 1; } } else passphrase = NULL; diff --git a/libarchive/archive_read_private.h b/libarchive/archive_read_private.h index 9b61a538..8eb5435b 100644 --- a/libarchive/archive_read_private.h +++ b/libarchive/archive_read_private.h @@ -221,7 +221,7 @@ struct archive_read { struct { struct archive_read_passphrase *first; struct archive_read_passphrase **last; - int candiate; + int candidate; archive_passphrase_callback *callback; void *client_data; } passphrases; |