summaryrefslogtreecommitdiff
path: root/src/GetResList.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-08-11 18:41:14 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-08-11 18:51:26 -0700
commit3c54e99864eb6dba0d0cde7fe0a23ed7c1f5875f (patch)
treec00b9f2dc00e8b391052d4a8726d356b0d772e8a /src/GetResList.c
parentbbe78f905da6e36ebe1fe520903c760107b92b78 (diff)
Use memcpy() instead of memmove() when buffers are known not to overlap
Most of these came from a mass bcopy() -> memmove() substitution in 1993 with a commit comment of "ANSIfication". Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/GetResList.c')
-rw-r--r--src/GetResList.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/GetResList.c b/src/GetResList.c
index 817a60c..b0665fe 100644
--- a/src/GetResList.c
+++ b/src/GetResList.c
@@ -96,9 +96,8 @@ XtGetResourceList(WidgetClass widget_class,
if (!widget_class->core_class.class_inited) {
/* Easy case */
- (void) memmove((char *) *resources,
- (char *) widget_class->core_class.resources,
- (size_t) size);
+ (void) memcpy(*resources, widget_class->core_class.resources,
+ (size_t) size);
*num_resources = widget_class->core_class.num_resources;
UNLOCK_PROCESS;
return;
@@ -169,9 +168,8 @@ XtGetConstraintResourceList(WidgetClass widget_class,
if (!class->core_class.class_inited) {
/* Easy case */
- (void) memmove((char *) *resources,
- (char *) class->constraint_class.resources,
- (size_t) size);
+ (void) memcpy(*resources, class->constraint_class.resources,
+ (size_t) size);
*num_resources = class->constraint_class.num_resources;
UNLOCK_PROCESS;
return;