encrypted-keys: fix Opt_err/Opt_error = -1
authorMimi Zohar <zohar@linux.ibm.com>
Tue, 18 Dec 2018 12:57:41 +0000 (07:57 -0500)
committerMimi Zohar <zohar@linux.ibm.com>
Mon, 4 Feb 2019 22:36:01 +0000 (17:36 -0500)
Properly start the enumeration associated with match_table_t at zero,
making Opt_err/Opt_error the last enumeration value.

Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
security/keys/encrypted-keys/encrypted.c

index 389a298..347108f 100644 (file)
@@ -60,11 +60,11 @@ static int blksize;
 static struct crypto_shash *hash_tfm;
 
 enum {
-       Opt_err = -1, Opt_new, Opt_load, Opt_update
+       Opt_new, Opt_load, Opt_update, Opt_err
 };
 
 enum {
-       Opt_error = -1, Opt_default, Opt_ecryptfs, Opt_enc32
+       Opt_default, Opt_ecryptfs, Opt_enc32, Opt_error
 };
 
 static const match_table_t key_format_tokens = {