diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-12-10 15:16:05 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-12-11 15:36:06 -0800 |
commit | bdbfa354dd4d93657104ccd7c9e892ed45197dd8 (patch) | |
tree | 222ce295a3e3994d4d762973ad1d8318c7743bdc /symbols.c | |
parent | f1757a005f471044da3f8e946a091b067996d270 (diff) |
Remove unnecessary casts from memcpy() calls
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'symbols.c')
-rw-r--r-- | symbols.c | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -171,8 +171,7 @@ CopyKeyInfo(KeyInfo * old, KeyInfo * new, Bool clearOld) new->numLevels[i] = 0; return False; } - memcpy((char *) new->syms[i], (char *) old->syms[i], - width * sizeof(KeySym)); + memcpy(new->syms[i], old->syms[i], width * sizeof(KeySym)); } if (old->acts[i] != NULL) { @@ -182,8 +181,7 @@ CopyKeyInfo(KeyInfo * old, KeyInfo * new, Bool clearOld) new->acts[i] = NULL; return False; } - memcpy((char *) new->acts[i], (char *) old->acts[i], - width * sizeof(XkbAction)); + memcpy(new->acts[i], old->acts[i], width * sizeof(XkbAction)); } } } @@ -1864,8 +1862,7 @@ PrepareKeyDef(KeyInfo * key) key->acts[i] = calloc(width, sizeof(XkbAction)); if (key->acts[i] == NULL) continue; - memcpy((void *) key->acts[i], (void *) key->acts[0], - width * sizeof(XkbAction)); + memcpy(key->acts[i], key->acts[0], width * sizeof(XkbAction)); key->actsDefined |= 1 << i; } if ((key->symsDefined & 1) && key->syms[0]) @@ -1873,8 +1870,7 @@ PrepareKeyDef(KeyInfo * key) key->syms[i] = calloc(width, sizeof(KeySym)); if (key->syms[i] == NULL) continue; - memcpy((void *) key->syms[i], (void *) key->syms[0], - width * sizeof(KeySym)); + memcpy(key->syms[i], key->syms[0], width * sizeof(KeySym)); key->symsDefined |= 1 << i; } if (defined & 1) |