diff options
| author | dearblue <[email protected]> | 2019-06-22 23:02:29 +0900 |
|---|---|---|
| committer | dearblue <[email protected]> | 2019-06-22 23:02:29 +0900 |
| commit | ec03e3f54af55af8c461a19b2f7cf0a984282997 (patch) | |
| tree | 1abecb495b2a8b670807e9a5295edf063fdf8519 /src/string.c | |
| parent | 567075aab939dd262e816832195cb11594abade9 (diff) | |
| download | mruby-ec03e3f54af55af8c461a19b2f7cf0a984282997.tar.gz mruby-ec03e3f54af55af8c461a19b2f7cf0a984282997.zip | |
Delete the unnecessary block brace in `mrb_str_reverse_bang`
Diffstat (limited to 'src/string.c')
| -rw-r--r-- | src/string.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/string.c b/src/string.c index a35262eb4..2cfdc337e 100644 --- a/src/string.c +++ b/src/string.c @@ -1712,15 +1712,14 @@ mrb_str_reverse_bang(mrb_state *mrb, mrb_value str) } } #endif - { - mrb_str_modify(mrb, s); - if (RSTR_LEN(s) > 1) { - p = RSTR_PTR(s); - e = p + RSTR_LEN(s) - 1; - str_reverse(p, e); - } - return str; + + mrb_str_modify(mrb, s); + if (RSTR_LEN(s) > 1) { + p = RSTR_PTR(s); + e = p + RSTR_LEN(s) - 1; + str_reverse(p, e); } + return str; } /* ---------------------------------- */ |
