summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-06-08 16:06:24 +0200
committerMichael Adam <obnox@samba.org>2012-06-08 18:08:08 +0200
commit41d830ea4fb8bf7cb20e08607ba9db9f53c03880 (patch)
tree23da79b9f51cf42df6915214f8b1506baafb1595 /source3/smbd
parenteb750d54589542d9e6d9d48ff3bed1890cee7050 (diff)
downloadsamba-41d830ea4fb8bf7cb20e08607ba9db9f53c03880.tar.gz
samba-41d830ea4fb8bf7cb20e08607ba9db9f53c03880.tar.bz2
samba-41d830ea4fb8bf7cb20e08607ba9db9f53c03880.zip
s3:smbd: remove unnecessary variable readret from read_file()
Pair-Programmed-With: Volker Lendecke <vl@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Fri Jun 8 18:08:09 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/fileio.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c
index 8fc7342707..a14be7806a 100644
--- a/source3/smbd/fileio.c
+++ b/source3/smbd/fileio.c
@@ -64,7 +64,7 @@ static bool read_from_write_cache(files_struct *fsp,char *data,off_t pos,size_t
ssize_t read_file(files_struct *fsp,char *data,off_t pos,size_t n)
{
- ssize_t ret=0,readret;
+ ssize_t ret = 0;
/* you can't read from print files */
if (fsp->print_file) {
@@ -87,15 +87,11 @@ ssize_t read_file(files_struct *fsp,char *data,off_t pos,size_t n)
fsp->fh->pos = pos;
if (n > 0) {
- readret = SMB_VFS_PREAD(fsp,data,n,pos);
+ ret = SMB_VFS_PREAD(fsp,data,n,pos);
- if (readret == -1) {
+ if (ret == -1) {
return -1;
}
-
- if (readret > 0) {
- ret += readret;
- }
}
DEBUG(10,("read_file (%s): pos = %.0f, size = %lu, returned %lu\n",