From bdbfa354dd4d93657104ccd7c9e892ed45197dd8 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 10 Dec 2022 15:16:05 -0800 Subject: Remove unnecessary casts from memcpy() calls Signed-off-by: Alan Coopersmith --- symbols.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/symbols.c b/symbols.c index d43d03c..350cef2 100644 --- a/symbols.c +++ b/symbols.c @@ -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) -- cgit v1.2.3