summaryrefslogtreecommitdiff
path: root/src/Resources.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-08-11 19:02:20 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-08-11 19:03:57 -0700
commit1aaf5d502027104ddd566090787780319f510278 (patch)
treeaaa11a76874c427ae4e8a15551a3c4ac1abce7c2 /src/Resources.c
parent3c54e99864eb6dba0d0cde7fe0a23ed7c1f5875f (diff)
downloadxorg-lib-libXt-1aaf5d502027104ddd566090787780319f510278.tar.gz
Use memcpy() instead of XtMemmove() when buffers are known to differ
Most of these came from a mass XtBCopy() -> XtMemmove() substitution in 1993 with a commit comment of "ANSIfication". But include/X11/IntrinsicI.h now defines XtMemmmove() as just calling memcpy() as long as src & dst differ, so remove an unnecessary check when we've just allocated a buffer, and reduce the chance that someone thinks we'll actually call memmove() instead of memcpy() Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/Resources.c')
-rw-r--r--src/Resources.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Resources.c b/src/Resources.c
index d8ea4fc..15a78c2 100644
--- a/src/Resources.c
+++ b/src/Resources.c
@@ -377,7 +377,7 @@ _XtDependencies(XtResourceList *class_resp, /* VAR */
new_res = (XrmResourceList *)
__XtMalloc((Cardinal) (new_num_res * sizeof(XrmResourceList)));
if (super_num_res > 0)
- XtMemmove(new_res, super_res, super_num_res * sizeof(XrmResourceList));
+ memcpy(new_res, super_res, super_num_res * sizeof(XrmResourceList));
/* Put pointers to class resource entries into new_res */
new_next = super_num_res;