summaryrefslogtreecommitdiff
path: root/xkb/maprules.c
diff options
context:
space:
mode:
authorMikhail Gusarov <dottedmag@dottedmag.net>2010-06-04 15:35:31 +0700
committerMikhail Gusarov <dottedmag@dottedmag.net>2010-06-06 15:07:27 +0700
commit5a0fc0ad21d562612676ef88ef2d533b2391810a (patch)
tree6a88d6c9f6194165e08c934f50ac490d8c381ac6 /xkb/maprules.c
parentf9810ba914877b379cb36f1b9755f7923ceca14c (diff)
Replace deprecated bzero with memset
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Marcin BaczyƄski <marbacz@gmail.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'xkb/maprules.c')
-rw-r--r--xkb/maprules.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/xkb/maprules.c b/xkb/maprules.c
index 3b15a4749..5aabd1c8e 100644
--- a/xkb/maprules.c
+++ b/xkb/maprules.c
@@ -270,7 +270,7 @@ Bool found;
l_ndx_present = v_ndx_present = present= 0;
str= &line->line[1];
len = remap->number;
- bzero((char *)remap,sizeof(RemapSpec));
+ memset((char *)remap, 0, sizeof(RemapSpec));
remap->number = len;
while ((tok=_XStrtok(str," ",strtok_buf))!=NULL) {
found= FALSE;
@@ -412,7 +412,7 @@ Bool append = FALSE;
DebugF("Illegal line of data ignored\n");
return FALSE;
}
- bzero((char *)&tmp,sizeof(FileSpec));
+ memset((char *)&tmp, 0, sizeof(FileSpec));
str= line->line;
for (nread= 0;(tok=_XStrtok(str," ",strtok_buf))!=NULL;nread++) {
str= NULL;
@@ -495,7 +495,7 @@ static Bool
MakeMultiDefs(XkbRF_MultiDefsPtr mdefs, XkbRF_VarDefsPtr defs)
{
- bzero((char *)mdefs,sizeof(XkbRF_MultiDefsRec));
+ memset((char *)mdefs, 0, sizeof(XkbRF_MultiDefsRec));
mdefs->model = defs->model;
mdefs->options = _XkbDupString(defs->options);
if (mdefs->options) squeeze_spaces(mdefs->options);
@@ -834,7 +834,7 @@ XkbRF_GetComponents( XkbRF_RulesPtr rules,
MakeMultiDefs(&mdefs, defs);
- bzero((char *)names,sizeof(XkbComponentNamesRec));
+ memset((char *)names, 0, sizeof(XkbComponentNamesRec));
XkbRF_ClearPartialMatches(rules);
XkbRF_CheckApplyRules(rules, &mdefs, names, XkbRF_Normal);
XkbRF_ApplyPartialMatches(rules, names);
@@ -876,7 +876,7 @@ XkbRF_AddRule(XkbRF_RulesPtr rules)
DebugF("Allocation failure in XkbRF_AddRule\n");
return NULL;
}
- bzero((char *)&rules->rules[rules->num_rules],sizeof(XkbRF_RuleRec));
+ memset((char *)&rules->rules[rules->num_rules], 0, sizeof(XkbRF_RuleRec));
return &rules->rules[rules->num_rules++];
}
@@ -898,7 +898,7 @@ XkbRF_AddGroup(XkbRF_RulesPtr rules)
return NULL;
}
- bzero((char *)&rules->groups[rules->num_groups],sizeof(XkbRF_GroupRec));
+ memset((char *)&rules->groups[rules->num_groups], 0, sizeof(XkbRF_GroupRec));
return &rules->groups[rules->num_groups++];
}
@@ -912,20 +912,20 @@ XkbRF_GroupRec tgroup,*group;
if (!(rules && file))
return FALSE;
- bzero((char *)&remap,sizeof(RemapSpec));
- bzero((char *)&tgroup,sizeof(XkbRF_GroupRec));
+ memset((char *)&remap, 0, sizeof(RemapSpec));
+ memset((char *)&tgroup, 0, sizeof(XkbRF_GroupRec));
InitInputLine(&line);
while (GetInputLine(file,&line,TRUE)) {
if (CheckLine(&line,&remap,&trule,&tgroup)) {
if (tgroup.number) {
if ((group= XkbRF_AddGroup(rules))!=NULL) {
*group= tgroup;
- bzero((char *)&tgroup,sizeof(XkbRF_GroupRec));
+ memset((char *)&tgroup, 0, sizeof(XkbRF_GroupRec));
}
} else {
if ((rule= XkbRF_AddRule(rules))!=NULL) {
*rule= trule;
- bzero((char *)&trule,sizeof(XkbRF_RuleRec));
+ memset((char *)&trule, 0, sizeof(XkbRF_RuleRec));
}
}
}
@@ -997,7 +997,7 @@ XkbRF_GroupPtr group;
if (rule->types) free(rule->types);
if (rule->compat) free(rule->compat);
if (rule->geometry) free(rule->geometry);
- bzero((char *)rule,sizeof(XkbRF_RuleRec));
+ memset((char *)rule, 0, sizeof(XkbRF_RuleRec));
}
free(rules->rules);
rules->num_rules= rules->sz_rules= 0;