about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMarco Peereboom <marco@conformal.com>2011-08-07 16:43:04 +0000
committerMarco Peereboom <marco@conformal.com>2011-08-07 16:43:04 +0000
commita18d59e4ca834a4ae4c9eb2eedc305bb5ae0afee (patch)
tree81925eb4e1a9e494e888067bb72b17ec703e1229
parentb63d29239446a531e8cef2a5e6ea861f38bbc96f (diff)
downloadxombrero-a18d59e4ca834a4ae4c9eb2eedc305bb5ae0afee.tar.gz
fix silly {} in switch. noticed by akfaew
-rw-r--r--xxxterm.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/xxxterm.c b/xxxterm.c
index 8608184..117518b 100644
--- a/xxxterm.c
+++ b/xxxterm.c
@@ -3818,6 +3818,7 @@ move(struct tab *t, struct karg *args)
 {
 	GtkAdjustment		*adjust;
 	double			pi, si, pos, ps, upper, lower, max;
+	double			percent;
 
 	switch (args->i) {
 	case XT_MOVE_DOWN:
@@ -3885,17 +3886,12 @@ move(struct tab *t, struct karg *args)
 		gtk_adjustment_set_value(adjust, MAX(pos, lower));
 		break;
 	case XT_MOVE_PERCENT:
-		{
-			double		percent;
-
-			percent = atoi(args->s) / 100.0;
-			pos = max * percent;
-			if (pos < 0.0 || pos > max)
-				break;
-
-			gtk_adjustment_set_value(adjust, pos);
+		percent = atoi(args->s) / 100.0;
+		pos = max * percent;
+		if (pos < 0.0 || pos > max)
 			break;
-		}
+		gtk_adjustment_set_value(adjust, pos);
+		break;
 	default:
 		return (XT_CB_PASSTHROUGH);
 	}