From 5a0fc0ad21d562612676ef88ef2d533b2391810a Mon Sep 17 00:00:00 2001 From: Mikhail Gusarov Date: Fri, 4 Jun 2010 15:35:31 +0700 Subject: Replace deprecated bzero with memset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mikhail Gusarov Reviewed-by: Marcin BaczyƄski Reviewed-by: Daniel Stone Reviewed-by: Alan Coopersmith Reviewed-by: Matt Turner --- xkb/maprules.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'xkb/maprules.c') 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; -- cgit v1.2.3