diff options
author | Jim Meyering <jim@meyering.net> | 2004-03-24 14:45:17 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2004-03-24 14:45:17 +0000 |
commit | 393592573cd69c18e12928b7f9c627657901cc3c (patch) | |
tree | b4ae89221d26436f529d7d953fb514d5ab5ad78e /lib | |
parent | e4b803c17e584c3787d1d1bd9950e2fd7c88188d (diff) | |
download | coreutils-393592573cd69c18e12928b7f9c627657901cc3c.tar.xz |
(readtokens0): Return true on success rather
than on failure. All callers changed. This also happens to fix a
portability bug on pre-C99 hosts, where (bool) INTEGER sometimes
returns false even when INTEGER is nonzero.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/readtokens0.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/readtokens0.c b/lib/readtokens0.c index db638a71c..b46ba8f85 100644 --- a/lib/readtokens0.c +++ b/lib/readtokens0.c @@ -60,7 +60,7 @@ save_token (struct Tokens *t) /* Read NUL-separated tokens from stream IN into T until EOF or error. The final NUL is optional. Always append a NULL pointer to the resulting list of token pointers, but that pointer isn't counted - via t->n_tok. */ + via t->n_tok. Return true if successful. */ bool readtokens0 (FILE *in, struct Tokens *t) { @@ -94,5 +94,5 @@ readtokens0 (FILE *in, struct Tokens *t) t->tok = obstack_finish (&t->o_tok); t->tok_len = obstack_finish (&t->o_tok_len); - return ferror (in); + return ! ferror (in); } |