chiark / gitweb /
Use initalization instead of explicit zeroing
[elogind.git] / src / cryptsetup / cryptsetup.c
index 51d4f99edc0bd513683051bb801cdaa3fcdc67c8..ae4aa8dba303335ceefaa03f4f8d44c473b3cbf2 100644 (file)
@@ -461,10 +461,7 @@ int main(int argc, char *argv[]) {
                                 k = crypt_load(cd, CRYPT_LUKS1, NULL);
 
                         if ((!opt_type && k < 0) || streq_ptr(opt_type, CRYPT_PLAIN)) {
-                                struct crypt_params_plain params;
-
-                                zero(params);
-                                params.hash = hash;
+                                struct crypt_params_plain params = { .hash = hash };
 
                                 /* for CRYPT_PLAIN limit reads
                                 * from keyfile to key length, and