summaryrefslogtreecommitdiff
path: root/lwlib/lwlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lwlib/lwlib.c')
-rw-r--r--lwlib/lwlib.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/lwlib/lwlib.c b/lwlib/lwlib.c
index 7d9920e8bce..c8eba9cf35e 100644
--- a/lwlib/lwlib.c
+++ b/lwlib/lwlib.c
@@ -103,11 +103,7 @@ static void show_one_widget_busy (Widget, Boolean);
char *
safe_strdup (const char *s)
{
- char *result;
- if (! s) return 0;
- result = (char *) xmalloc (strlen (s) + 1);
- strcpy (result, s);
- return result;
+ return s ? xstrdup (s) : 0;
}
static void