[hackers] [lchat] slackline: remove redundant lines in sl_move() || Tom Schwindl

From: <git_AT_suckless.org>
Date: Thu, 13 Oct 2022 22:59:08 +0200 (CEST)

commit 8573652f3306be2762777fbf98096b9982783bf6
Author: Tom Schwindl <schwindl_AT_posteo.de>
AuthorDate: Thu Oct 13 16:52:38 2022 +0200
Commit: Jan Klemkow <j.klemkow_AT_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
_AT_@ -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;
         }
 
Received on Thu Oct 13 2022 - 22:59:08 CEST

This archive was generated by hypermail 2.3.0 : Thu Oct 13 2022 - 23:00:39 CEST