summaryrefslogtreecommitdiffstats
path: root/source3/modules
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-12-15 21:07:00 +0100
committerJeremy Allison <jra@samba.org>2013-12-17 01:57:12 +0100
commit5677c63f1cafec833aa2f77d1b20f575ec2f3eeb (patch)
tree28da02e01b9de31c027c3dabcb736530d07e8e35 /source3/modules
parent65d0dceea53035d379eb125cdd78e43501709e4e (diff)
downloadsamba-5677c63f1cafec833aa2f77d1b20f575ec2f3eeb.tar.gz
samba-5677c63f1cafec833aa2f77d1b20f575ec2f3eeb.tar.xz
samba-5677c63f1cafec833aa2f77d1b20f575ec2f3eeb.zip
scannedonly: Fix CID 242109 Unchecked return value from library
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_scannedonly.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/modules/vfs_scannedonly.c b/source3/modules/vfs_scannedonly.c
index 0d2e7cc35b..3cee511c6a 100644
--- a/source3/modules/vfs_scannedonly.c
+++ b/source3/modules/vfs_scannedonly.c
@@ -228,10 +228,12 @@ static int connect_to_scanner(vfs_handle_struct * handle)
large directory with lots of unscanned files. */
int sndsize;
socklen_t size = sizeof(int);
- getsockopt(so->socket, SOL_SOCKET, SO_RCVBUF,
- (char *)&sndsize, &size);
- DEBUG(SCANNEDONLY_DEBUG, ("current socket buffer size=%d\n",
- sndsize));
+ if (getsockopt(so->socket, SOL_SOCKET, SO_RCVBUF,
+ (char *)&sndsize, &size) == 0) {
+ DEBUG(SCANNEDONLY_DEBUG,
+ ("current socket buffer size=%d\n",
+ sndsize));
+ }
sndsize = 262144;
if (setsockopt(so->socket, SOL_SOCKET, SO_RCVBUF,
(char *)&sndsize,