From 5b68a2cef1a1dcfba3ea1a28ef837352066fd80e Mon Sep 17 00:00:00 2001 From: Oleksij Rempel Date: Fri, 4 Jan 2019 14:40:07 +0100 Subject: [PATCH] jcat: inverse if logic it was if(offset != NULL), so it should be if(offset) Signed-off-by: Oleksij Rempel --- jcat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jcat.c b/jcat.c index 5a55bb1..304a0dc 100644 --- a/jcat.c +++ b/jcat.c @@ -89,7 +89,7 @@ static int jcat_sendfile(struct jcat_priv *priv, int out_fd, int in_fd, goto do_nofree; } - if (!offset) { + if (offset) { /* Save current file offset and set offset to value in '*offset' */ @@ -148,7 +148,7 @@ static int jcat_sendfile(struct jcat_priv *priv, int out_fd, int in_fd, tot_sent += num_sent; } - if (!offset) { + if (offset) { /* Return updated file offset in '*offset', and reset the file offset to the value it had when we were called. */