summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-12-10 15:21:49 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-12-11 15:36:06 -0800
commit8e58b7949ab96180d60fb13f7820d6cc01c228ae (patch)
tree678aa0cb9e88858568f68aac0ae24fcd4b5d8cf4
parentbdbfa354dd4d93657104ccd7c9e892ed45197dd8 (diff)
Remove unnecessary casts from bzero() calls
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--action.c4
-rw-r--r--alias.c2
-rw-r--r--compat.c8
-rw-r--r--geometry.c4
-rw-r--r--keycodes.c6
-rw-r--r--symbols.c2
-rw-r--r--xkbcomp.c6
7 files changed, 15 insertions, 17 deletions
diff --git a/action.c b/action.c
index c6ff547..7c8074a 100644
--- a/action.c
+++ b/action.c
@@ -1493,7 +1493,7 @@ ActionsInit(void)
{
if (!actionsInitialized)
{
- bzero((char *) &constTrue, sizeof(constTrue));
+ bzero(&constTrue, sizeof(constTrue));
constTrue = (ExprDef) {
.common.stmtType = StmtExpr,
.common.next = NULL,
@@ -1501,7 +1501,7 @@ ActionsInit(void)
.type = TypeBoolean,
.value.str = XkbInternAtom(NULL, "true", False)
};
- bzero((char *) &constFalse, sizeof(constFalse));
+ bzero(&constFalse, sizeof(constFalse));
constFalse = (ExprDef) {
.common.stmtType = StmtExpr,
.common.next = NULL,
diff --git a/alias.c b/alias.c
index 6f39c16..9c4ba65 100644
--- a/alias.c
+++ b/alias.c
@@ -140,7 +140,7 @@ MergeAliases(AliasInfo ** into, AliasInfo ** merge, unsigned how_merge)
*merge = NULL;
return True;
}
- bzero((char *) &def, sizeof(KeyAliasDef));
+ bzero(&def, sizeof(KeyAliasDef));
for (tmp = *merge; tmp != NULL; tmp = (AliasInfo *) tmp->def.next)
{
if (how_merge == MergeDefault)
diff --git a/compat.c b/compat.c
index 479c8d2..af57ac3 100644
--- a/compat.c
+++ b/compat.c
@@ -123,8 +123,7 @@ InitCompatInfo(CompatInfo * info, XkbDescPtr xkb)
info->ledDflt.defs.fileID = info->fileID;
info->ledDflt.defs.defined = 0;
info->ledDflt.defs.merge = MergeOverride;
- bzero((char *) &info->groupCompat[0],
- XkbNumKbdGroups * sizeof(GroupCompatInfo));
+ bzero(&info->groupCompat[0], XkbNumKbdGroups * sizeof(GroupCompatInfo));
info->leds = NULL;
InitVModInfo(&info->vmods, xkb);
return;
@@ -147,8 +146,7 @@ ClearCompatInfo(CompatInfo * info, XkbDescPtr xkb)
ClearIndicatorMapInfo(xkb->dpy, &info->ledDflt);
info->nInterps = 0;
info->interps = (SymInterpInfo *) ClearCommonInfo(&info->interps->defs);
- bzero((char *) &info->groupCompat[0],
- XkbNumKbdGroups * sizeof(GroupCompatInfo));
+ bzero(&info->groupCompat[0], XkbNumKbdGroups * sizeof(GroupCompatInfo));
info->leds = (LEDInfo *) ClearCommonInfo(&info->leds->defs);
/* 3/30/94 (ef) -- XXX! Should free action info here */
ClearVModInfo(&info->vmods, xkb);
@@ -163,7 +161,7 @@ NextInterp(CompatInfo * info)
si = malloc(sizeof(SymInterpInfo));
if (si)
{
- bzero((char *) si, sizeof(SymInterpInfo));
+ bzero(si, sizeof(SymInterpInfo));
info->interps =
(SymInterpInfo *) AddCommonInfo(&info->interps->defs,
(CommonInfo *) si);
diff --git a/geometry.c b/geometry.c
index 032872a..82f302d 100644
--- a/geometry.c
+++ b/geometry.c
@@ -702,7 +702,7 @@ NextProperty(GeometryInfo * info)
pi = malloc(sizeof(PropertyInfo));
if (pi)
{
- bzero((char *) pi, sizeof(PropertyInfo));
+ bzero(pi, sizeof(PropertyInfo));
info->props = (PropertyInfo *) AddCommonInfo(&info->props->defs,
(CommonInfo *) pi);
info->nProps++;
@@ -779,7 +779,7 @@ NextShape(GeometryInfo * info)
si = malloc(sizeof(ShapeInfo));
if (si)
{
- bzero((char *) si, sizeof(ShapeInfo));
+ bzero(si, sizeof(ShapeInfo));
info->shapes = (ShapeInfo *) AddCommonInfo(&info->shapes->defs,
(CommonInfo *) si);
info->nShapes++;
diff --git a/keycodes.c b/keycodes.c
index 8904774..8e4fe9e 100644
--- a/keycodes.c
+++ b/keycodes.c
@@ -276,9 +276,9 @@ ClearKeyNamesInfo(KeyNamesInfo * info)
info->computedMin = 256;
info->effectiveMin = 8;
info->effectiveMax = 255;
- bzero((char *) info->names, sizeof(info->names));
- bzero((char *) info->files, sizeof(info->files));
- bzero((char *) info->has_alt_forms, sizeof(info->has_alt_forms));
+ bzero(info->names, sizeof(info->names));
+ bzero(info->files, sizeof(info->files));
+ bzero(info->has_alt_forms, sizeof(info->has_alt_forms));
if (info->leds)
ClearIndicatorNameInfo(info->leds, info);
if (info->aliases)
diff --git a/symbols.c b/symbols.c
index 350cef2..d5c2af4 100644
--- a/symbols.c
+++ b/symbols.c
@@ -273,7 +273,7 @@ FreeSymbolsInfo(SymbolsInfo * info)
ClearAliases(&info->aliases);
info->aliases = NULL;
}
- bzero((char *) info, sizeof(SymbolsInfo));
+ bzero(info, sizeof(SymbolsInfo));
return;
}
diff --git a/xkbcomp.c b/xkbcomp.c
index 0ecccc3..d97220f 100644
--- a/xkbcomp.c
+++ b/xkbcomp.c
@@ -1021,7 +1021,7 @@ main(int argc, char *argv[])
}
}
}
- bzero((char *) &result, sizeof(result));
+ bzero(&result, sizeof(result));
result.type = mapToUse->type;
if ((result.xkb = XkbAllocKeyboard()) == NULL)
{
@@ -1065,7 +1065,7 @@ main(int argc, char *argv[])
else if (inputFormat == INPUT_XKM) /* parse xkm file */
{
unsigned tmp;
- bzero((char *) &result, sizeof(result));
+ bzero(&result, sizeof(result));
if ((result.xkb = XkbAllocKeyboard()) == NULL)
{
WSGO("Cannot allocate keyboard description\n");
@@ -1087,7 +1087,7 @@ main(int argc, char *argv[])
}
else if (inDpy != NULL)
{
- bzero((char *) &result, sizeof(result));
+ bzero(&result, sizeof(result));
result.type = XkmKeymapFile;
result.xkb = XkbGetMap(inDpy, XkbAllMapComponentsMask, device_id);
if (result.xkb == NULL)