summaryrefslogtreecommitdiff
path: root/utils/vmstat.c
diff options
context:
space:
mode:
authorMarcus Brinkmann <marcus@gnu.org>2003-08-03 14:19:32 +0000
committerMarcus Brinkmann <marcus@gnu.org>2003-08-03 14:19:32 +0000
commit5726f30168a8d39294167bd9cd8eefb06203ffd6 (patch)
tree3fa27f4b56a57db6e6653408202538a22bfde8de /utils/vmstat.c
parent0ed0f028e849509fe892cd7061617f8ad5eb3dff (diff)
2002-06-16 James A. Morrison <ja2morri@uwaterloo.ca>
* vmstat.c (vm_state_refresh): Use memset instead of bzero. (main): Likewise.
Diffstat (limited to 'utils/vmstat.c')
-rw-r--r--utils/vmstat.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/vmstat.c b/utils/vmstat.c
index 29b7c45b..86494dce 100644
--- a/utils/vmstat.c
+++ b/utils/vmstat.c
@@ -199,7 +199,7 @@ vm_state_refresh (struct vm_state *state)
return err;
/* Mark the info as invalid, but leave DEF_PAGER alone. */
- bzero (&state->def_pager_info, sizeof state->def_pager_info);
+ memset (&state->def_pager_info, 0, sizeof state->def_pager_info);
return 0;
}
@@ -431,7 +431,7 @@ main (int argc, char **argv)
/* Construct an options vector for them. */
field_opts_size = ((num_fields + 1) * sizeof (struct argp_option));
field_opts = alloca (field_opts_size);
- bzero (field_opts, field_opts_size);
+ memset (field_opts, 0, field_opts_size);
for (field = fields; field->name; field++)
{
@@ -443,7 +443,7 @@ main (int argc, char **argv)
opt->doc = field->doc;
opt->group = 2;
}
- /* No need to terminate FIELD_OPTS because the bzero above's done so. */
+ /* No need to terminate FIELD_OPTS because the memset above has done so. */
field_argp.options = field_opts;
@@ -476,7 +476,7 @@ main (int argc, char **argv)
(field)->type, SIZE_UNITS (field))
/* Actually fetch the statistics. */
- bzero (&state, sizeof (state)); /* Initialize STATE. */
+ memset (&state, 0, sizeof (state)); /* Initialize STATE. */
err = vm_state_refresh (&state);
if (err)
error (2, err, "vm_state_refresh");