summaryrefslogtreecommitdiff
path: root/menuitems.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2007-08-17 13:50:20 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2007-08-17 13:50:20 +0200
commit9fa6d9f9ddb3893d4e1d99673ffbb5076fdb56ab (patch)
treebbba460d7ab3f4f0ab266e7147707dd06ab13c8a /menuitems.c
parent1f3dbe585be2d71740529f4bf460b118213bcf92 (diff)
downloadvdr-9fa6d9f9ddb3893d4e1d99673ffbb5076fdb56ab.tar.gz
vdr-9fa6d9f9ddb3893d4e1d99673ffbb5076fdb56ab.tar.bz2
Optimized cMenuEditChrItem::Set()
Diffstat (limited to 'menuitems.c')
-rw-r--r--menuitems.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/menuitems.c b/menuitems.c
index 44661ec1..a900e4a8 100644
--- a/menuitems.c
+++ b/menuitems.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menuitems.c 1.50 2007/08/04 09:12:18 kls Exp $
+ * $Id: menuitems.c 1.51 2007/08/17 13:48:07 kls Exp $
*/
#include "menuitems.h"
@@ -222,7 +222,8 @@ cMenuEditChrItem::~cMenuEditChrItem()
void cMenuEditChrItem::Set(void)
{
char buf[2];
- snprintf(buf, sizeof(buf), "%c", *value);
+ buf[0] = *value;
+ buf[1] = '\0';
SetValue(buf);
}
@@ -490,9 +491,7 @@ eOSState cMenuEditStrItem::ProcessKey(eKeys Key)
break;
case kBlue|k_Repeat:
case kBlue: // consume the key only if in edit-mode
- if (InEditMode())
- ;
- else
+ if (!InEditMode())
return osUnknown;
break;
case kLeft|k_Repeat: