summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/printing/printing.c2
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index 50494e37dc..e48a2d173c 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -2232,7 +2232,7 @@ pause, or resume print job. User name: %s. Printer name: %s.",
ssize_t print_job_write(int snum, uint32 jobid, const char *buf, SMB_OFF_T pos, size_t size)
{
const char* sharename = lp_const_servicename(snum);
- int return_code;
+ ssize_t return_code;
struct printjob *pjob;
pjob = print_job_find(sharename, jobid);
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index b70376f52a..a35c5f6382 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -5288,7 +5288,7 @@ WERROR _spoolss_EndDocPrinter(pipes_struct *p,
WERROR _spoolss_WritePrinter(pipes_struct *p,
struct spoolss_WritePrinter *r)
{
- uint32_t buffer_written;
+ ssize_t buffer_written;
int snum;
Printer_entry *Printer = find_printer_index_by_hnd(p, r->in.handle);
@@ -5302,11 +5302,11 @@ WERROR _spoolss_WritePrinter(pipes_struct *p,
if (!get_printer_snum(p, r->in.handle, &snum, NULL))
return WERR_BADFID;
- buffer_written = (uint32_t)print_job_write(snum, Printer->jobid,
+ buffer_written = print_job_write(snum, Printer->jobid,
(const char *)r->in.data.data,
(SMB_OFF_T)-1,
(size_t)r->in._data_size);
- if (buffer_written == (uint32_t)-1) {
+ if (buffer_written == (ssize_t)-1) {
*r->out.num_written = 0;
if (errno == ENOSPC)
return WERR_NO_SPOOL_SPACE;