Skip to content

Commit

Permalink
cifs: switch CIFSSMBQAllEAs to use memcmp
Browse files Browse the repository at this point in the history
...as that's more efficient when we know that the lengths are equal.

Reported-by: David Howells <dhowells@redhat.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
  • Loading branch information
Jeff Layton authored and Steve French committed Oct 13, 2011
1 parent 875cd04 commit ac42344
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/cifs/cifssmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -5840,7 +5840,7 @@ CIFSSMBQAllEAs(const int xid, struct cifs_tcon *tcon,

if (ea_name) {
if (ea_name_len == name_len &&
strncmp(ea_name, temp_ptr, name_len) == 0) {
memcmp(ea_name, temp_ptr, name_len) == 0) {
temp_ptr += name_len + 1;
rc = value_len;
if (buf_size == 0)
Expand Down

0 comments on commit ac42344

Please sign in to comment.