summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2018-05-01 11:51:43 -0700
committerRalph Boehme <slow@samba.org>2018-05-04 22:34:24 +0200
commit2bea1103e5d322515eac7ddae5e1444ceb5e7b97 (patch)
tree5891f11490b720d7191c55923ce750b687b815d1 /source3/printing
parent70eb53366995e842f0f29733979a13b6738ffb1a (diff)
downloadsamba-2bea1103e5d322515eac7ddae5e1444ceb5e7b97.tar.gz
s3: printing: Remove the LSEEK in printing_pread_data() and use read_file() instead.
Removes last-but-one user of SMB_VFS_READ. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/nt_printing.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 6bc48ae3634..a96122a15b2 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -324,17 +324,15 @@ static ssize_t printing_pread_data(files_struct *fsp,
size_t total=0;
off_t in_pos = *poff;
- in_pos = SMB_VFS_LSEEK(fsp, in_pos, SEEK_SET);
- if (in_pos == (off_t)-1) {
- return -1;
- }
/* Don't allow integer wrap on read. */
if (in_pos + byte_count < in_pos) {
return -1;
}
while (total < byte_count) {
- ssize_t ret = SMB_VFS_READ(fsp, buf + total,
+ ssize_t ret = read_file(fsp,
+ buf + total,
+ in_pos,
byte_count - total);
if (ret == 0) {