Unify checks for misaligned values.

This commit is contained in:
Ondrej Kozina
2018-08-24 11:27:40 +02:00
committed by Milan Broz
parent 622943529e
commit d41b1a7560
7 changed files with 25 additions and 17 deletions

View File

@@ -71,7 +71,7 @@ int VERITY_read_sb(struct crypt_device *cd,
return -EINVAL;
}
if (sb_offset % 512) {
if (MISALIGNED_512(sb_offset)) {
log_err(cd, _("Unsupported VERITY hash offset."));
return -EINVAL;
}