Skip to content

Commit

Permalink
jffs2: remove redundant check on outpos > pos
Browse files Browse the repository at this point in the history
The check for outpos > pos is always false because outpos is zero
and pos is at least zero; outpos can never be greater than pos.
The check is redundant and can be removed.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
  • Loading branch information
ColinIanKing authored and richardweinberger committed Nov 14, 2024
1 parent ef027ac commit 7c8e694
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions fs/jffs2/compr_rubin.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,6 @@ static int rubin_do_compress(int bit_divider, int *bits, unsigned char *data_in,

end_rubin(&rs);

if (outpos > pos) {
/* We failed */
return -1;
}

/* Tell the caller how much we managed to compress,
* and how much space it took */

Expand Down

0 comments on commit 7c8e694

Please sign in to comment.