diff options
author | Sverker Eriksson <sverker@erlang.org> | 2021-02-09 17:43:47 +0100 |
---|---|---|
committer | Sverker Eriksson <sverker@erlang.org> | 2021-02-18 18:51:15 +0100 |
commit | 7e4f7f51db5d7e05ca1b47020abab7687a94cf07 (patch) | |
tree | 276fb9a7c67026f84070c5650ee36ae0463073a2 /erts/emulator/beam/erl_bif_binary.c | |
parent | 8f086707f59fe8309b85d59b253992fedf70346a (diff) | |
download | erlang-7e4f7f51db5d7e05ca1b47020abab7687a94cf07.tar.gz |
erts: Silence stupid CodeChecker in parse_match_opts_list()
It thinks islist(l) can return true in "if" and then false in "while".
Diffstat (limited to 'erts/emulator/beam/erl_bif_binary.c')
-rw-r--r-- | erts/emulator/beam/erl_bif_binary.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_bif_binary.c b/erts/emulator/beam/erl_bif_binary.c index dbc606505e..8d87f95f4b 100644 --- a/erts/emulator/beam/erl_bif_binary.c +++ b/erts/emulator/beam/erl_bif_binary.c @@ -1275,7 +1275,7 @@ static int parse_match_opts_list(Eterm l, Eterm bin, Uint *posp, Uint *endp) *endp = binary_size(bin); return 0; } else if (is_list(l)) { - while(is_list(l)) { + do { Eterm t = CAR(list_val(l)); Uint orig_size; if (!is_tuple(t)) { @@ -1318,7 +1318,7 @@ static int parse_match_opts_list(Eterm l, Eterm bin, Uint *posp, Uint *endp) goto badarg; } l = CDR(list_val(l)); - } + } while (is_list(l)); return 0; } else { badarg: |