diff options
author | Jim Meyering <jim@meyering.net> | 1995-10-03 20:28:44 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1995-10-03 20:28:44 +0000 |
commit | 111cb717e8a982aa7030b891c99cd2c9c135bf22 (patch) | |
tree | 76fa4a9b390467563742343449d1744b07d56a7c | |
parent | 6a45f61547154db0450a4d3cb9e555108d48749e (diff) | |
download | coreutils-111cb717e8a982aa7030b891c99cd2c9c135bf22.tar.xz |
(set_fields): Use memset (not open coded loop) to initialize array.
-rw-r--r-- | src/cut.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -464,8 +464,7 @@ set_fields (const char *fieldstr) (i.e. `2-6' or `-4', but not `5-') in FIELDSTR. */ printable_field = (int *) xmalloc ((max_range_endpoint + 1) * sizeof (int)); - for (i = 1; i <= max_range_endpoint; i++) - printable_field[i] = 0; + memset (printable_field, 0, (max_range_endpoint + 1) * sizeof (int)); /* Set the array entries corresponding to integers in the ranges of RP. */ for (i = 0; i < n_rp; i++) |