diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-01-06 14:23:12 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-01-06 14:23:12 +0900 |
| commit | 1341e53961b3e99ac67d803e5ead677e976d18c4 (patch) | |
| tree | 6bc0d5d2b72386705e33e14e178d54069175aa9b /mrbgems/mruby-compiler/core/parse.y | |
| parent | ca3a6156bf0d15031ad946a67e9a88b4fb288d38 (diff) | |
| download | mruby-1341e53961b3e99ac67d803e5ead677e976d18c4.tar.gz mruby-1341e53961b3e99ac67d803e5ead677e976d18c4.zip | |
Avoid comparing `-1` with `size_t` (unsigned); Use `~0` instead.
Diffstat (limited to 'mrbgems/mruby-compiler/core/parse.y')
| -rw-r--r-- | mrbgems/mruby-compiler/core/parse.y | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y index 78c1eefd0..a5f3f93de 100644 --- a/mrbgems/mruby-compiler/core/parse.y +++ b/mrbgems/mruby-compiler/core/parse.y @@ -4776,7 +4776,7 @@ parse_string(parser_state *p) pylval.nd = nd; if (unindent && head) { hinf->indented = push(hinf->indented, cons(nd->cdr, escaped)); - if ((hinf->indent == -1 || spaces < hinf->indent) && (!empty || !line_head)) + if ((hinf->indent == ~0 || spaces < hinf->indent) && (!empty || !line_head)) hinf->indent = spaces; } return tHD_STRING_MID; @@ -4868,7 +4868,7 @@ parse_string(parser_state *p) if (hinf) { if (unindent && head) { hinf->indented = push(hinf->indented, cons(nd->cdr, escaped)); - if (hinf->indent == -1 || spaces < hinf->indent) + if (hinf->indent == ~0 || spaces < hinf->indent) hinf->indent = spaces; } hinf->line_head = FALSE; @@ -5087,7 +5087,7 @@ heredoc_identifier(parser_state *p) info->type = (string_type)type; info->allow_indent = indent || squiggly; info->remove_indent = squiggly; - info->indent = -1; + info->indent = ~0; info->indented = NULL; info->line_head = TRUE; info->doc = NULL; |
