commit 8573652f3306be2762777fbf98096b9982783bf6 parent f7052595cdec83861c5f28bc5e579c6238b5aced Author: Tom Schwindl <schwindl@posteo.de> Date: Thu, 13 Oct 2022 16:52:38 +0200 slackline: remove redundant lines in sl_move() Diffstat:
M | slackline.c | | | 8 | ++------ |
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git 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; }