From 181299ffb9382b2d552ce10ebf575cff70e64c65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Fri, 27 Feb 2009 03:33:57 +0000 Subject: [PATCH] don't set unused variables, make it more obvious that the switchstatement return. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24872 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/editline/editline.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/editline/editline.c b/lib/editline/editline.c index ad4e75a92..c371393a8 100644 --- a/lib/editline/editline.c +++ b/lib/editline/editline.c @@ -811,15 +811,16 @@ meta(void) if ((c = TTYget()) == EOF) return CSeof; /* Also include VT-100 arrows. */ - if (c == '[' || c == 'O') - switch (c = TTYget()) { - default: return ring_bell(); + if (c == '[' || c == 'O') { + switch (TTYget()) { case EOF: return CSeof; case 'A': return h_prev(); case 'B': return h_next(); case 'C': return fd_char(); case 'D': return bk_char(); } + return ring_bell(); + } if (isdigit(c)) { for (Repeat = c - '0'; (c = TTYget()) != EOF && isdigit(c); )