chiark / gitweb /
cryptsetup: fix inverted comparison in pass_volume_key
authorDave Reisner <dreisner@archlinux.org>
Tue, 6 Nov 2012 15:17:18 +0000 (10:17 -0500)
committerDave Reisner <dreisner@archlinux.org>
Tue, 6 Nov 2012 15:18:10 +0000 (10:18 -0500)
src/cryptsetup/cryptsetup.c

index e8ba3f0..56a3b50 100644 (file)
@@ -468,7 +468,8 @@ int main(int argc, char *argv[]) {
                                                  opt_keyfile_size,
                                                  &params);
 
                                                  opt_keyfile_size,
                                                  &params);
 
-                                pass_volume_key = !!hash;
+                                /* hash == NULL implies the user passed "plain" */
+                                pass_volume_key = (hash == NULL);
                         }
 
                         if (k < 0) {
                         }
 
                         if (k < 0) {