Introduction
Introduction Statistics Contact Development Disclaimer Help
stylistic change: check EOF before strchr(). - json2tsv - JSON to TSV converter
git clone git://git.codemadness.org/json2tsv
Log
Files
Refs
README
LICENSE
---
commit 42251415a957f095453b290a96bcf870632eb58d
parent 33c1ceffbcb04f8a6970d04841175f96737942bb
Author: Hiltjo Posthuma <[email protected]>
Date: Wed, 23 Oct 2019 19:07:17 +0200
stylistic change: check EOF before strchr().
should have no functional difference, but check EOF first
Diffstat:
M json.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/json.c b/json.c
@@ -289,8 +289,9 @@ escchr:
expect = EXPECT_END;
while (1) {
c = GETNEXT();
- if (!c || !strchr("0123456789eE+-.", c) ||
- c == EOF || p + 1 >= sizeof(pri)) {
+ if (c == EOF ||
+ !c || !strchr("0123456789eE+-.", c) ||
+ p + 1 >= sizeof(pri)) {
pri[p] = '\0';
cb(nodes, depth + 1, pri);
goto handlechr; /* do not read next ch…
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.