cifs: switch CIFSSMBQAllEAs to use memcmp
authorJeff Layton <jlayton@redhat.com>
Tue, 11 Oct 2011 10:41:32 +0000 (06:41 -0400)
committerSteve French <smfrench@gmail.com>
Thu, 13 Oct 2011 04:41:14 +0000 (23:41 -0500)
...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>
fs/cifs/cifssmb.c

index a80f7bd97b90d541e9305d7e225c708f3f0cd3d1..b7df4bff3aaa473c4d34501591746d3ea344c88e 100644 (file)
@@ -5840,7 +5840,7 @@ QAllEAsRetry:
 
                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)