From: Jim Meyering Date: Mon, 31 May 2004 11:30:27 +0000 (+0000) Subject: (set_initialize): Remove unnecessary initialization of the `in_set' X-Git-Tag: v5.3.0~1466 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6b970542fe4cccd2822f53d74d4561219c75b52e;p=thirdparty%2Fcoreutils.git (set_initialize): Remove unnecessary initialization of the `in_set' buffer; that initialization triggered the same compiler bug as above. --- diff --git a/src/tr.c b/src/tr.c index 3f0065af49..ef3711aa37 100644 --- a/src/tr.c +++ b/src/tr.c @@ -1664,10 +1664,11 @@ read_and_xlate (char *buf, size_t size) return bytes_read; } -/* Initialize a boolean membership set IN_SET with the character +/* Initialize a boolean membership set, IN_SET, with the character values obtained by traversing the linked list of constructs S - using the function `get_next'. If COMPLEMENT_THIS_SET is - true the resulting set is complemented. */ + using the function `get_next'. IN_SET is expected to have been + initialized to all zeros by the caller. If COMPLEMENT_THIS_SET + is true the resulting set is complemented. */ static void set_initialize (struct Spec_list *s, bool complement_this_set, bool *in_set) @@ -1675,7 +1676,6 @@ set_initialize (struct Spec_list *s, bool complement_this_set, bool *in_set) int c; size_t i; - memset (in_set, 0, N_CHARS * sizeof (in_set[0])); s->state = BEGIN_STATE; while ((c = get_next (s, NULL)) != -1) in_set[c] = true;