commit 8573652f3306be2762777fbf98096b9982783bf6 Author: Tom Schwindl <schwi...@posteo.de> AuthorDate: Thu Oct 13 16:52:38 2022 +0200 Commit: Jan Klemkow <j.klem...@wemelug.de> CommitDate: Thu Oct 13 22:58:40 2022 +0200
slackline: remove redundant lines in sl_move() diff --git a/slackline.c b/slackline.c index d7047a5..4a4a2a9 100644 --- a/slackline.c +++ b/slackline.c @@ -124,18 +124,14 @@ sl_move(struct slackline *sl, enum direction dir) return; case END: sl->rcur = sl->rlen; - sl->bcur = sl_postobyte(sl, sl->rcur); - sl->ptr = sl->buf + sl->bcur; - return; + break; case RIGHT: if (sl->rcur < sl->rlen) sl->rcur++; break; case LEFT: - if (sl->rcur > 0) { + if (sl->rcur > 0) sl->rcur--; - sl->bcur = sl_postobyte(sl, sl->rcur); - } break; }