diff options
author | Matt Turner <mattst88@gmail.com> | 2010-08-27 18:34:49 -0400 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2010-08-27 19:05:48 -0400 |
commit | 08adf41f6315663cbac33d010214d98f3e1c8814 (patch) | |
tree | 6589b58b25fe0cb1b1c58bb3f74058004f6fa230 /Xi | |
parent | ea239112b030588ed3cdd113643ba5f6207a5bd9 (diff) |
Replace malloc/strlen/strcpy with strdup.
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'Xi')
-rw-r--r-- | Xi/extinit.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Xi/extinit.c b/Xi/extinit.c index eda4efb50..7edadeaf2 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -1154,8 +1154,7 @@ void AssignTypeAndName(DeviceIntPtr dev, Atom type, char *name) { dev->xinput_type = type; - dev->name = (char *)malloc(strlen(name) + 1); - strcpy(dev->name, name); + dev->name = strdup(name); } /*********************************************************************** |