浏览代码

fscrypt: remove redundant assignment of res

res is assigned to sizeof(ctx), however, this is unused and res
is updated later on without that assigned value to res ever being
used.  Remove this redundant assignment.

Fixes CoverityScan CID#1395546 "Unused value"

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Colin Ian King 8 年之前
父节点
当前提交
02680b31a0
共有 1 个文件被更改,包括 0 次插入1 次删除
  1. 0 1
      fs/crypto/keyinfo.c

+ 0 - 1
fs/crypto/keyinfo.c

@@ -211,7 +211,6 @@ retry:
 		ctx.contents_encryption_mode = FS_ENCRYPTION_MODE_AES_256_XTS;
 		ctx.contents_encryption_mode = FS_ENCRYPTION_MODE_AES_256_XTS;
 		ctx.filenames_encryption_mode = FS_ENCRYPTION_MODE_AES_256_CTS;
 		ctx.filenames_encryption_mode = FS_ENCRYPTION_MODE_AES_256_CTS;
 		memset(ctx.master_key_descriptor, 0x42, FS_KEY_DESCRIPTOR_SIZE);
 		memset(ctx.master_key_descriptor, 0x42, FS_KEY_DESCRIPTOR_SIZE);
-		res = sizeof(ctx);
 	} else if (res != sizeof(ctx)) {
 	} else if (res != sizeof(ctx)) {
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}