]> git.baikalelectronics.ru Git - kernel.git/commit
SUNRPC: fix uninitialized variable warning
authorAlakesh Haloi <alakesh.haloi@gmail.com>
Tue, 26 Mar 2019 02:00:01 +0000 (02:00 +0000)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Tue, 26 Mar 2019 20:04:32 +0000 (13:04 -0700)
commitdcd4d7b996f077c97a02c018ccf199c68d9d48ae
treeed85bd1061cc859e6a1d35c4f9e86e0548194a29
parent5953fe82ca88d1445a6ee56ec6426c9c52a1a648
SUNRPC: fix uninitialized variable warning

Avoid following compiler warning on uninitialized variable

net/sunrpc/xprtsock.c: In function ‘xs_read_stream_request.constprop’:
net/sunrpc/xprtsock.c:525:10: warning: ‘read’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   return read;
          ^~~~
net/sunrpc/xprtsock.c:529:23: warning: ‘ret’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  return ret < 0 ? ret : read;
         ~~~~~~~~~~~~~~^~~~~~

Signed-off-by: Alakesh Haloi <alakesh.haloi@gmail.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
net/sunrpc/xprtsock.c