From b1dad5cb3c01877638086761cf6119d8b4e4db63 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Fri, 14 Apr 2006 10:02:43 +0200 Subject: [PATCH] Removed the unnecessary 'value' member from cMenuEditItem --- HISTORY | 1 + menuitems.c | 8 ++------ menuitems.h | 3 +-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/HISTORY b/HISTORY index 4f5ae2c3..31dc962c 100644 --- a/HISTORY +++ b/HISTORY @@ -4507,3 +4507,4 @@ Video Disk Recorder Revision History new 'noneString' in cMenuEditChanItem (reported by Thomas Günther). - Added NULL checks to some strdup() calls in menuitems.c (suggested by Darren Salt). +- Removed the unnecessary 'value' member from cMenuEditItem. diff --git a/menuitems.c b/menuitems.c index 56e5a4b0..1a362cc2 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.38 2006/04/14 09:59:16 kls Exp $ + * $Id: menuitems.c 1.39 2006/04/14 10:02:18 kls Exp $ */ #include "menuitems.h" @@ -24,21 +24,17 @@ const char *FileNameChars = " abcdefghijklmnopqrstuvwxyz0123456789-.#~,/_@"; cMenuEditItem::cMenuEditItem(const char *Name) { name = strdup(Name ? Name : "???"); - value = NULL; } cMenuEditItem::~cMenuEditItem() { free(name); - free(value); } void cMenuEditItem::SetValue(const char *Value) { - free(value); - value = strdup(Value); char *buffer = NULL; - asprintf(&buffer, "%s:\t%s", name, value); + asprintf(&buffer, "%s:\t%s", name, Value); SetText(buffer, false); cStatus::MsgOsdCurrentItem(buffer); } diff --git a/menuitems.h b/menuitems.h index f993e6cf..2454f95a 100644 --- a/menuitems.h +++ b/menuitems.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menuitems.h 1.19 2006/04/09 12:05:05 kls Exp $ + * $Id: menuitems.h 1.20 2006/04/14 10:01:47 kls Exp $ */ #ifndef __MENUITEMS_H @@ -17,7 +17,6 @@ extern const char *FileNameChars; class cMenuEditItem : public cOsdItem { private: char *name; - char *value; public: cMenuEditItem(const char *Name); ~cMenuEditItem();