Commit f7254c69 authored by Alan Coopersmith's avatar Alan Coopersmith Committed by Ulrich Sibiller

Use strdup instead of Xmalloc+strcpy in _XDefaultOpenIM

parent b912a404
...@@ -202,9 +202,8 @@ _XDefaultOpenIM( ...@@ -202,9 +202,8 @@ _XDefaultOpenIM(
} }
} }
#undef MODIFIER #undef MODIFIER
if ((im->core.im_name = Xmalloc(i+1)) == NULL) if ((im->core.im_name = strdup(buf)) == NULL)
goto Error; goto Error;
strcpy(im->core.im_name, buf);
im->methods = (XIMMethods)&local_im_methods; im->methods = (XIMMethods)&local_im_methods;
im->core.lcd = lcd; im->core.lcd = lcd;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment