Nuke rxvt_strdup.
authorayin <ayin>
Sun, 28 Oct 2007 11:25:04 +0000 (11:25 +0000)
committerayin <ayin>
Sun, 28 Oct 2007 11:25:04 +0000 (11:25 +0000)
src/init.C
src/rxvt.h
src/rxvtfont.C

index 009d5a440973dc5e890cfa136a9529313e2b99e7..3069d028825800a5329f3ffbeb747da1165a2b9a 100644 (file)
@@ -659,7 +659,7 @@ rxvt_term::set_locale (const char *locale)
     }
 
 
-  this->locale = rxvt_strdup (this->locale);
+  this->locale = strdup (this->locale);
   SET_LOCALE (this->locale);
   mbstate.reset ();
 #endif
index 1c5ef050305595c315d0b3b35e375ff7078746d9..342262de587b82bbfd064c97a8cd4d6ef44dae27 100644 (file)
@@ -107,8 +107,6 @@ wchar_t *        rxvt_mbstowcs                    (const char *str, int len = -1
 char *           rxvt_wcstoutf8                   (const wchar_t *str, int len = -1);
 wchar_t *        rxvt_utf8towcs                   (const char *str, int len = -1);
 
-#define rxvt_strdup(s) ((s) ? strdup(s) : 0)
-
 char *           rxvt_basename                    (const char *str) NOTHROW;
 void             rxvt_vlog                        (const char *fmt, va_list arg_ptr) NOTHROW;
 void             rxvt_log                         (const char *fmt,...) NOTHROW;
index c24d721f0eb39634252ae03de8d4b04b4ef60459..45eb7798aeed355b704850dd6a92840c77471ef4 100644 (file)
@@ -514,7 +514,7 @@ rxvt_font_x11::get_property (XFontStruct *f, Atom property, const char *repl) co
   if (XGetFontProperty (f, property, &value))
     return XGetAtomName (term->dpy, value);
   else
-    return rxvt_strdup (repl);
+    return repl ? strdup (repl) : 0;
 }
 
 rxvt_fontprop