mirror of
https://git.code.sf.net/p/linux-ima/ima-evm-utils
synced 2025-07-16 04:00:43 +02:00
Address "ignoring number of bytes read" messages
Coverity complains about the existing "if (!fread(....))" and inverse syntax. Change it to make Coverity happy. Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
This commit is contained in:
@ -156,7 +156,7 @@ static int add_file_hash(const char *file, EVP_MD_CTX *ctx)
|
||||
|
||||
for (size = stats.st_size; size; size -= len) {
|
||||
len = MIN(size, bs);
|
||||
if (!fread(data, len, 1, fp)) {
|
||||
if (fread(data, len, 1, fp) != 1) {
|
||||
if (ferror(fp)) {
|
||||
log_err("fread() failed\n\n");
|
||||
goto out;
|
||||
|
Reference in New Issue
Block a user