duskos

dusk os fork
git clone git://git.alexwennerberg.com/duskos
Log | Files | Refs | README | LICENSE

commit b8b4fd38490dd5a04b10e354f0c2840b1dfe25a8
parent c4ec74e921086d00e2e58b1e7eca1e8cc6ea4b25
Author: Virgil Dupras <hsoft@hardcoded.net>
Date:   Wed, 30 Nov 2022 11:10:32 -0500

ar/puff: remove false TODO

The problem came from ?: not guaranteeing eval shortcut, but that's by design.

Diffstat:
Mfs/ar/puff.c | 1-
Mfs/doc/cc/usage.txt | 3++-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ar/puff.c b/fs/ar/puff.c @@ -700,7 +700,6 @@ int puff(unsigned char *dest, /* pointer to destination pointer */ do { last = bits(&s, 1); /* one if last block */ type = bits(&s, 2); /* block type 0..3 */ - // TODO: the ?: ops fail on this if (type == 0) err = stored(&s); else if (type == 1) err = fixed(&s); else if (type == 2) err = dynamic(&s); diff --git a/fs/doc/cc/usage.txt b/fs/doc/cc/usage.txt @@ -32,7 +32,8 @@ are a few differences: * "unsigned" always goes first * no "signed" (always default), no "auto" * No logical shortcut guarantee. In (a && b), b will be executed even if a - yields 0. + yields 0. This is also true of the "x ? y : z" operator. Both y and z are + evaluated regardless of x. * Number literals are the same as Dusk OS, so 12345, $1234 and 'X'. No 0x1234 or 0o777. * string literals are not null-terminated, but "counted strings". The exact same