Skip to content
Snippets Groups Projects
Commit 3566a2b0 authored by Namjae Jeon's avatar Namjae Jeon
Browse files

cifsd: use memcmp instead of for loop check in oid_eq()


Use memcmp instead of for loop check in oid_eq().

Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarNamjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent cdd10398
No related branches found
No related tags found
No related merge requests found
......@@ -110,16 +110,10 @@ static bool
oid_eq(unsigned long *oid1, unsigned int oid1len,
unsigned long *oid2, unsigned int oid2len)
{
unsigned int i;
if (oid1len != oid2len)
return false;
for (i = 0; i < oid1len; i++) {
if (oid1[i] != oid2[i])
return false;
}
return true;
return memcmp(oid1, oid2, oid1len) == 0;
}
int
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment