mirror of
https://git.code.sf.net/p/linux-ima/ima-evm-utils
synced 2025-04-27 22:32:31 +02:00
libimaevm: Remove unused off variable
The 'off' variable was unused in add_dir_hash(), so remove it. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
This commit is contained in:
parent
161a4a5026
commit
837591b81b
@ -181,7 +181,7 @@ static int add_dir_hash(const char *file, EVP_MD_CTX *ctx)
|
||||
{
|
||||
struct dirent *de;
|
||||
DIR *dir;
|
||||
unsigned long long ino, off;
|
||||
unsigned long long ino;
|
||||
unsigned int type;
|
||||
int result = 0;
|
||||
|
||||
@ -193,12 +193,10 @@ static int add_dir_hash(const char *file, EVP_MD_CTX *ctx)
|
||||
|
||||
while ((de = readdir(dir))) {
|
||||
ino = de->d_ino;
|
||||
off = de->d_off;
|
||||
type = de->d_type;
|
||||
log_debug("entry: %s, ino: %llu, type: %u, off: %llu, reclen: %hu\n",
|
||||
de->d_name, ino, type, off, de->d_reclen);
|
||||
log_debug("entry: %s, ino: %llu, type: %u, reclen: %hu\n",
|
||||
de->d_name, ino, type, de->d_reclen);
|
||||
if (EVP_DigestUpdate(ctx, de->d_name, strlen(de->d_name)) != 1 ||
|
||||
/* EVP_DigestUpdate(ctx, &off, sizeof(off)) != 1 || */
|
||||
EVP_DigestUpdate(ctx, &ino, sizeof(ino)) != 1||
|
||||
EVP_DigestUpdate(ctx, &type, sizeof(type)) != 1) {
|
||||
log_err("EVP_DigestUpdate() failed\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user