[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gawk 3.1.6: rand.awk test case alignment problem
From: |
Eric Blake |
Subject: |
Re: gawk 3.1.6: rand.awk test case alignment problem |
Date: |
Wed, 23 Apr 2008 21:34:06 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080213 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Aharon Robbins on 4/23/2008 1:25 PM:
|> @@ -759,7 +759,6 @@ static struct {
|> { ":graph:]", is_graph },
|> { ":cntrl:]", is_cntrl },
|> { ":blank:]", is_blank },
|> - { 0 }
|> };
|
| The correct fix is actually to supply two zeros in that final initializer,
| since the code that uses this array does expect there to be a NULL
pointer in
| the final element.
Ah, but C guarantees that if you 0-initialize the first element of a
struct or array, the remaining elements are implicitly 0-initialized. So
even though this patch omits the second element of the final struct,
adding an explicit NULL won't change the behavior.
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkgP/64ACgkQ84KuGfSFAYBvVwCdHbREuySaGN5uO34EG/JWXORg
E3kAn1NPvDgavWdTDUxUOglciBQZUUhI
=VH2T
-----END PGP SIGNATURE-----