From ca9dd144aedf36876d84299c8a9eb15ee8856875 Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Sun, 18 May 2014 21:31:53 +0200 Subject: [PATCH] WINGs: removed unnecessary gotos in handleTextKeyPress When the condition can be simply checked in an if, it is better to do that than to use a flow breaking goto. Signed-off-by: Christophe CURIS --- WINGs/wtext.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/WINGs/wtext.c b/WINGs/wtext.c index c112fbe8..734dc8bc 100644 --- a/WINGs/wtext.c +++ b/WINGs/wtext.c @@ -2231,11 +2231,8 @@ static void handleTextKeyPress(Text * tPtr, XEvent * event) case XK_Left: if (!(tb = tPtr->currentTextBlock)) break; - if (tb->graphic) - goto L_imaGFX; - if (tPtr->tpos == 0) { - L_imaGFX: + if (tb->graphic || tPtr->tpos == 0) { if (tb->prior) { tPtr->currentTextBlock = tb->prior; if (tPtr->currentTextBlock->graphic) @@ -2256,10 +2253,7 @@ static void handleTextKeyPress(Text * tPtr, XEvent * event) case XK_Right: if (!(tb = tPtr->currentTextBlock)) break; - if (tb->graphic) - goto R_imaGFX; - if (tPtr->tpos == tb->used) { - R_imaGFX: + if (tb->graphic || tPtr->tpos == tb->used) { if (tb->next) { tPtr->currentTextBlock = tb->next; tPtr->tpos = 0; -- 2.11.4.GIT