aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorJeff Layton2011-07-28 12:48:26 -0400
committerSteve French2011-07-31 21:21:13 +0000
commit5980fc966bb347801f3fcc39a2ef2a1e14fbf8cb (patch)
tree64a3750c18ed9fae2486f0c53d48804efd66a34f /fs
parent91d065c47317cd5f6577fa077cca3383c8d9243d (diff)
cifs: fix compiler warning in CIFSSMBQAllEAs
The recent fix to the above function causes this compiler warning to pop on some gcc versions: CC [M] fs/cifs/cifssmb.o fs/cifs/cifssmb.c: In function ‘CIFSSMBQAllEAs’: fs/cifs/cifssmb.c:5708: warning: ‘ea_name_len’ may be used uninitialized in this function Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/cifssmb.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 0580da1cf34c..187afe38dac7 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -5720,7 +5720,7 @@ CIFSSMBQAllEAs(const int xid, struct cifs_tcon *tcon,
char *temp_ptr;
char *end_of_smb;
__u16 params, byte_count, data_offset;
- unsigned int ea_name_len;
+ unsigned int ea_name_len = ea_name ? strlen(ea_name) : 0;
cFYI(1, "In Query All EAs path %s", searchName);
QAllEAsRetry:
@@ -5815,10 +5815,6 @@ QAllEAsRetry:
list_len -= 4;
temp_fea = ea_response_data->list;
temp_ptr = (char *)temp_fea;
-
- if (ea_name)
- ea_name_len = strlen(ea_name);
-
while (list_len > 0) {
unsigned int name_len;
__u16 value_len;