* dbxread.c, i386-pinsn.c, i386-tdep.c, regex.c, solib.c, symmisc.c,

symtab.h, tm-i386v4.h, valprint.c, values.c:  Lint.
	* breakpoint.c, c-exp.y, coffread.c, command.c, environ.c, eval.c,
	findvar.c, infcmd.c, infptrace.c, infrun.c, m2-exp.y, parse.c,
	putenv.c, solib.c, sparc-xdep.c, symtab.c, tm-i386v.h, tm-sparc.h,
	utils.c, valarith.c, valops.c, valprint.c, values.c:
	Replace bcopy() use with memcpy(), which is more standard and can
	take advantage of gcc's builtin functions for increased performance.
	* breakpoint.c, buildsym.c, coffread.c, dbxread.c, i386-tdep.c,
	ieee-float.c, infcmd.c, sparc-tdep.c, stack.c, symtab.c, symtab.h,
	target.c, values.c:
	Replace bzero() use with memset(), which is more standard and can
	take advantage of gcc's builtin functions for increased performance.
	* i386-tdep.c, main.c, valprint.c:
	Replace bcmp() use with memcmp(), which is more standard and can
	take advantage of gcc's builtin functions for increased performance.
This commit is contained in:
Fred Fish
1992-06-29 23:34:38 +00:00
parent 22fd4704bc
commit 51b57ded88
44 changed files with 837 additions and 373 deletions

View File

@@ -220,8 +220,8 @@ dbx_lookup_type (typenums)
type_vector = (struct type **)
xrealloc ((char *) type_vector,
(type_vector_length * sizeof (struct type *)));
bzero (&type_vector[old_len],
(type_vector_length - old_len) * sizeof (struct type *));
(void) memset (&type_vector[old_len], 0,
(type_vector_length - old_len) * sizeof (struct type *));
}
return &type_vector[index];
}
@@ -243,8 +243,8 @@ dbx_lookup_type (typenums)
f->length *= 2;
f->vector = (struct type **)
xrealloc ((char *) f->vector, f->length * sizeof (struct type *));
bzero (&f->vector[f_orig_length],
(f->length - f_orig_length) * sizeof (struct type *));
(void) memset (&f->vector[f_orig_length], 0,
(f->length - f_orig_length) * sizeof (struct type *));
}
return &f->vector[index];
}
@@ -968,7 +968,7 @@ void
buildsym_new_init ()
{
/* Empty the hash table of global syms looking for values. */
bzero (global_sym_chain, sizeof global_sym_chain);
(void) memset (global_sym_chain, 0, sizeof global_sym_chain);
buildsym_init ();
}
@@ -2825,7 +2825,7 @@ read_array_type (pp, type, objfile)
/* Create range type. */
range_type = (struct type *)
obstack_alloc (&objfile -> type_obstack, sizeof (struct type));
bzero (range_type, sizeof (struct type));
(void) memset (range_type, 0, sizeof (struct type));
TYPE_OBJFILE (range_type) = objfile;
TYPE_CODE (range_type) = TYPE_CODE_RANGE;
TYPE_TARGET_TYPE (range_type) = index_type;
@@ -2905,7 +2905,7 @@ read_enum_type (pp, type, objfile)
n = read_number (pp, ',');
sym = (struct symbol *) obstack_alloc (&objfile -> symbol_obstack, sizeof (struct symbol));
bzero (sym, sizeof (struct symbol));
(void) memset (sym, 0, sizeof (struct symbol));
SYMBOL_NAME (sym) = name;
SYMBOL_CLASS (sym) = LOC_CONST;
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
@@ -3254,7 +3254,7 @@ read_range_type (pp, typenums, objfile)
result_type = (struct type *)
obstack_alloc (&objfile -> type_obstack,
sizeof (struct type));
bzero (result_type, sizeof (struct type));
(void) memset (result_type, 0, sizeof (struct type));
TYPE_OBJFILE (result_type) = objfile;
TYPE_LENGTH (result_type) = nbits / TARGET_CHAR_BIT;
TYPE_CODE (result_type) = TYPE_CODE_INT;
@@ -3366,7 +3366,7 @@ read_range_type (pp, typenums, objfile)
result_type = (struct type *)
obstack_alloc (&objfile -> type_obstack, sizeof (struct type));
bzero (result_type, sizeof (struct type));
(void) memset (result_type, 0, sizeof (struct type));
TYPE_OBJFILE (result_type) = objfile;
TYPE_CODE (result_type) = TYPE_CODE_RANGE;
@@ -3381,7 +3381,7 @@ read_range_type (pp, typenums, objfile)
TYPE_FIELDS (result_type) =
(struct field *) obstack_alloc (&objfile -> type_obstack,
2 * sizeof (struct field));
bzero (TYPE_FIELDS (result_type), 2 * sizeof (struct field));
(void) memset (TYPE_FIELDS (result_type), 0, 2 * sizeof (struct field));
TYPE_FIELD_BITPOS (result_type, 0) = n2;
TYPE_FIELD_BITPOS (result_type, 1) = n3;
@@ -3469,7 +3469,7 @@ read_args (pp, end, objfile)
else if (TYPE_CODE (types[n-1]) != TYPE_CODE_VOID)
{
rval = (struct type **) xmalloc ((n + 1) * sizeof (struct type *));
bzero (rval + n, sizeof (struct type *));
(void) memset (rval + n, 0, sizeof (struct type *));
}
else
{