diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2015-12-19 09:20:55 -0800 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2016-10-19 21:40:30 +0200 |
commit | f7254c69f00eb41fd3b8a78c6ae5d09fcfe1c01a (patch) | |
tree | 44ff1ef79ed23acf4ee2454562de1e1361b1d78c /nx-X11/lib | |
parent | b912a4042d884ccc2f226ab80ddc7272967d58b2 (diff) | |
download | nx-libs-f7254c69f00eb41fd3b8a78c6ae5d09fcfe1c01a.tar.gz nx-libs-f7254c69f00eb41fd3b8a78c6ae5d09fcfe1c01a.tar.bz2 nx-libs-f7254c69f00eb41fd3b8a78c6ae5d09fcfe1c01a.zip |
Use strdup instead of Xmalloc+strcpy in _XDefaultOpenIM
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
Diffstat (limited to 'nx-X11/lib')
-rw-r--r-- | nx-X11/lib/X11/XDefaultIMIF.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/nx-X11/lib/X11/XDefaultIMIF.c b/nx-X11/lib/X11/XDefaultIMIF.c index 4e75fa0b4..7c32ce296 100644 --- a/nx-X11/lib/X11/XDefaultIMIF.c +++ b/nx-X11/lib/X11/XDefaultIMIF.c @@ -202,9 +202,8 @@ _XDefaultOpenIM( } } #undef MODIFIER - if ((im->core.im_name = Xmalloc(i+1)) == NULL) + if ((im->core.im_name = strdup(buf)) == NULL) goto Error; - strcpy(im->core.im_name, buf); im->methods = (XIMMethods)&local_im_methods; im->core.lcd = lcd; |