summaryrefslogtreecommitdiff
path: root/src/TMkey.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/TMkey.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/TMkey.c')
-rw-r--r--src/TMkey.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/TMkey.c b/src/TMkey.c
index b747f07..49b7547 100644
--- a/src/TMkey.c
+++ b/src/TMkey.c
@@ -740,8 +740,7 @@ XtKeysymToKeycodeList(Display *dpy,
maxcodes += KEYCODE_ARRAY_SIZE;
keycodes = (KeyCode *) __XtMalloc(maxcodes * sizeof(KeyCode));
if (ncodes) {
- (void) memmove((char *) keycodes, (char *) old,
- ncodes * sizeof(KeyCode));
+ (void) memcpy(keycodes, old, ncodes * sizeof(KeyCode));
XtFree((char *) old);
}
codeP = &keycodes[ncodes];