diff options
author | Adam Tkac <atkac@redhat.com> | 2009-09-04 10:57:20 +0000 |
---|---|---|
committer | Adam Tkac <atkac@redhat.com> | 2009-09-04 10:57:20 +0000 |
commit | d36b626bbb7b90306d3d93a5b82fd117fe8ec15f (patch) | |
tree | a535fbe60d92182b93c8a5f3a1f4e5d811c3a8a8 /common/rfb/Configuration.cxx | |
parent | 97abe8a548ff9ca940d568128b21813b8a253872 (diff) | |
download | tigervnc-d36b626bbb7b90306d3d93a5b82fd117fe8ec15f.tar.gz tigervnc-d36b626bbb7b90306d3d93a5b82fd117fe8ec15f.zip |
Revert previous commit (r3889). Windows code has to be cleaned before this
change.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3890 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'common/rfb/Configuration.cxx')
-rw-r--r-- | common/rfb/Configuration.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/common/rfb/Configuration.cxx b/common/rfb/Configuration.cxx index fd4c23ae..9ebc20a8 100644 --- a/common/rfb/Configuration.cxx +++ b/common/rfb/Configuration.cxx @@ -67,7 +67,7 @@ Configuration* Configuration::global() { // -=- Configuration implementation Configuration::Configuration(const char* name_, Configuration* attachToGroup) -: name(safe_strdup(name_)), head(0), _next(0) { +: name(strDup(name_)), head(0), _next(0) { if (attachToGroup) { _next = attachToGroup->_next; attachToGroup->_next = this; @@ -182,7 +182,7 @@ void Configuration::list(int width, int nameWidth) { if (column + (int)strlen(def_str) + 11 > width) fprintf(stderr,"\n%*s",nameWidth+4,""); fprintf(stderr," (default=%s)\n",def_str); - free(def_str); + strFree(def_str); } else { fprintf(stderr,"\n"); } @@ -315,11 +315,11 @@ void BoolParameter::setParam(bool b) { char* BoolParameter::getDefaultStr() const { - return safe_strdup(def_value ? "1" : "0"); + return strDup(def_value ? "1" : "0"); } char* BoolParameter::getValueStr() const { - return safe_strdup(value ? "1" : "0"); + return strDup(value ? "1" : "0"); } bool BoolParameter::isBool() const { @@ -381,7 +381,7 @@ IntParameter::operator int() const { StringParameter::StringParameter(const char* name_, const char* desc_, const char* v, Configuration* conf) - : VoidParameter(name_, desc_, conf), value(safe_strdup(v)), def_value(v) + : VoidParameter(name_, desc_, conf), value(strDup(v)), def_value(v) { if (!v) { fprintf(stderr,"Default value <null> for %s not allowed\n",name_); @@ -390,7 +390,7 @@ StringParameter::StringParameter(const char* name_, const char* desc_, } StringParameter::~StringParameter() { - free(value); + strFree(value); } bool StringParameter::setParam(const char* v) { @@ -400,17 +400,17 @@ bool StringParameter::setParam(const char* v) { throw rfb::Exception("setParam(<null>) not allowed"); vlog.debug("set %s(String) to %s", getName(), v); CharArray oldValue(value); - value = safe_strdup(v); + value = strDup(v); return value != 0; } char* StringParameter::getDefaultStr() const { - return safe_strdup(def_value); + return strDup(def_value); } char* StringParameter::getValueStr() const { LOCK_CONFIG; - return safe_strdup(value); + return strDup(value); } // -=- BinaryParameter |