summaryrefslogtreecommitdiff
path: root/action.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-12-10 13:26:39 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-12-11 14:35:34 -0800
commit77b1efa1c83ad64d49d1e9c085d2a496580ce6f9 (patch)
treec121541999a472231178f6d9244266a5e953341d /action.c
parent64761ee9424f755b84ab0ce02d13eda32d215a14 (diff)
Use C99 struct initializers
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'action.c')
-rw-r--r--action.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/action.c b/action.c
index 7d66e54..7aae498 100644
--- a/action.c
+++ b/action.c
@@ -1494,17 +1494,21 @@ ActionsInit(void)
if (!actionsInitialized)
{
bzero((char *) &constTrue, sizeof(constTrue));
+ constTrue = (ExprDef) {
+ .common.stmtType = StmtExpr,
+ .common.next = NULL,
+ .op = ExprIdent,
+ .type = TypeBoolean,
+ .value.str = XkbInternAtom(NULL, "true", False)
+ };
bzero((char *) &constFalse, sizeof(constFalse));
- constTrue.common.stmtType = StmtExpr;
- constTrue.common.next = NULL;
- constTrue.op = ExprIdent;
- constTrue.type = TypeBoolean;
- constTrue.value.str = XkbInternAtom(NULL, "true", False);
- constFalse.common.stmtType = StmtExpr;
- constFalse.common.next = NULL;
- constFalse.op = ExprIdent;
- constFalse.type = TypeBoolean;
- constFalse.value.str = XkbInternAtom(NULL, "false", False);
+ constFalse = (ExprDef) {
+ .common.stmtType = StmtExpr,
+ .common.next = NULL,
+ .op = ExprIdent,
+ .type = TypeBoolean,
+ .value.str = XkbInternAtom(NULL, "false", False)
+ };
actionsInitialized = 1;
}
return;