summaryrefslogtreecommitdiffstats
path: root/unix/tx
diff options
context:
space:
mode:
authorAdam Tkac <atkac@redhat.com>2009-09-04 10:16:58 +0000
committerAdam Tkac <atkac@redhat.com>2009-09-04 10:16:58 +0000
commit97abe8a548ff9ca940d568128b21813b8a253872 (patch)
treed38ea6a539b2cc4e70d9569e71985914818546cd /unix/tx
parent8ed9009b4c4f497a95114d878334de3e13457bdd (diff)
downloadtigervnc-97abe8a548ff9ca940d568128b21813b8a253872.tar.gz
tigervnc-97abe8a548ff9ca940d568128b21813b8a253872.zip
Replace rfb::strDup by safe_strdup and remove rfb::strFree in favor of free()
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3889 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'unix/tx')
-rw-r--r--unix/tx/TXButton.h2
-rw-r--r--unix/tx/TXLabel.h2
-rw-r--r--unix/tx/TXMenu.cxx2
-rw-r--r--unix/tx/TXWindow.cxx2
4 files changed, 4 insertions, 4 deletions
diff --git a/unix/tx/TXButton.h b/unix/tx/TXButton.h
index b7472797..59a84303 100644
--- a/unix/tx/TXButton.h
+++ b/unix/tx/TXButton.h
@@ -59,7 +59,7 @@ public:
// setText() changes the text in the button.
void setText(const char* text_) {
- text.buf = rfb::strDup(text_);
+ text.buf = safe_strdup(text_);
int textWidth = XTextWidth(defaultFS, text.buf, strlen(text.buf));
int textHeight = (defaultFS->ascent + defaultFS->descent);
int newWidth = __rfbmax(width(), textWidth + xPad*2 + bevel*2);
diff --git a/unix/tx/TXLabel.h b/unix/tx/TXLabel.h
index 3d5200d6..ebb8403c 100644
--- a/unix/tx/TXLabel.h
+++ b/unix/tx/TXLabel.h
@@ -47,7 +47,7 @@ public:
// setText() changes the text in the label.
void setText(const char* text_) {
- text.buf = rfb::strDup(text_);
+ text.buf = safe_strdup(text_);
lines = 0;
int lineStart = 0;
int textWidth = 0;
diff --git a/unix/tx/TXMenu.cxx b/unix/tx/TXMenu.cxx
index 92712f55..df57daf8 100644
--- a/unix/tx/TXMenu.cxx
+++ b/unix/tx/TXMenu.cxx
@@ -56,7 +56,7 @@ inline int TXMenu::entryHeight(int i)
void TXMenu::addEntry(const char* text_, long id_)
{
assert(nEntries < maxEntries);
- text[nEntries] = rfb::strDup(text_);
+ text[nEntries] = safe_strdup(text_);
checked[nEntries] = false;
id[nEntries++] = id_;
int tw = 0;
diff --git a/unix/tx/TXWindow.cxx b/unix/tx/TXWindow.cxx
index 2b535df8..1b695e5b 100644
--- a/unix/tx/TXWindow.cxx
+++ b/unix/tx/TXWindow.cxx
@@ -93,7 +93,7 @@ void TXWindow::init(Display* dpy, const char* defaultWindowClass_)
static char tickBits[] = { 0x80, 0xc0, 0xe2, 0x76, 0x3e, 0x1c, 0x08, 0x00};
tick = XCreateBitmapFromData(dpy, DefaultRootWindow(dpy), tickBits,
tickSize, tickSize);
- defaultWindowClass = rfb::strDup(defaultWindowClass_);
+ defaultWindowClass = safe_strdup(defaultWindowClass_);
}
void TXWindow::handleXEvents(Display* dpy)