jcat: inverse if logic

it was if(offset != NULL), so it should be if(offset)

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
This commit is contained in:
Oleksij Rempel
2019-01-04 14:40:07 +01:00
parent 0083a3762b
commit 5b68a2cef1
+2 -2
View File
@@ -89,7 +89,7 @@ static int jcat_sendfile(struct jcat_priv *priv, int out_fd, int in_fd,
goto do_nofree; goto do_nofree;
} }
if (!offset) { if (offset) {
/* Save current file offset and set offset to value in '*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; tot_sent += num_sent;
} }
if (!offset) { if (offset) {
/* Return updated file offset in '*offset', and reset the file offset /* Return updated file offset in '*offset', and reset the file offset
to the value it had when we were called. */ to the value it had when we were called. */