From a1b0c86af35ef878a104183c9bec2c6c79658703 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 29 Dec 2015 05:46:47 +0100 Subject: impelement satd-add MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/daemon.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/daemon.c') diff --git a/src/daemon.c b/src/daemon.c index d262749..88e1b93 100644 --- a/src/daemon.c +++ b/src/daemon.c @@ -64,7 +64,7 @@ extern char **environ; * @param offset See pread(3). * @return See pread(3), only short if the file is shorter. */ -static ssize_t +ssize_t preadn(int fildes, void *buf, size_t nbyte, size_t offset) { PIO(pread); @@ -80,7 +80,7 @@ preadn(int fildes, void *buf, size_t nbyte, size_t offset) * @param offset See pwrite(3). * @return See pwrite(3). */ -static ssize_t +ssize_t pwriten(int fildes, void *buf, size_t nbyte, size_t offset) { PIO(pwrite); @@ -327,7 +327,7 @@ remove_job(const char *jobno, int runjob) { char *end; char *buf = NULL; - size_t no = 0, off = 0, n; + size_t no = 0, off = sizeof(size_t), n; ssize_t r; struct stat attr; struct job job; @@ -398,7 +398,7 @@ fail: struct job ** get_jobs(void) { - size_t off = 0, n, j = 0; + size_t off = sizeof(size_t), n, j = 0; struct stat attr; struct job **js = NULL; struct job job; -- cgit v1.2.3-70-g09d2