summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2013-04-18 17:15:05 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2013-04-18 17:17:09 +0200
commit5784bfde370970e08a0e72d6e0b31486de9b3b5d (patch)
tree771098a74a0742d64cda789e130dee4b8ed3a16b /src
parent40293af99eee781b3782cb6ff7cc49d648e68254 (diff)
main: fix error checking in nft_parse
The bison parser returns 0 in case of success and it returns 1 in case of error. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r--src/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 68d7e1e8..eed87e5d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -244,7 +244,7 @@ int main(int argc, char * const *argv)
}
ret = nft_parse(scanner, &state);
- if (ret < 0)
+ if (ret != 0)
goto out;
memset(&ctx, 0, sizeof(ctx));