Skip to contentSkip to conversation

cifs: silence compiler warning

PATCH New Kulikov Vasiliy 1 participant 1 message Jul 5, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cifs: silence compiler warning

If buf is NULL then ppdata is unitialized after exit from validate_ntransact(). In this case we do not use ppdata, but compiler warns us. Make it happy.

This patch silences a compiler warning:
fs/cifs/cifssmb.c: In function ‘CIFSSMBGetCIFSACL’:
fs/cifs/cifssmb.c:3082: warning: ‘pdata’ may be used uninitialized in this function

---
 fs/cifs/cifssmb.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/cifs/cifssmb.c +1 -0
index c65c341..22805e2 100644
@@ -2506,6 +2506,7 @@ validate_ntransact(char *buf, char **ppparm, char **ppdata,
 
 	*pdatalen = 0;
 	*pparmlen = 0;
+	*ppdata = 0;
 
 	if (buf = NULL)
 		return -EINVAL;
Signature · 1 line
1.7.0.4