diff options
Diffstat (limited to 'ext/-test-/string/cstr.c')
-rw-r--r-- | ext/-test-/string/cstr.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/-test-/string/cstr.c b/ext/-test-/string/cstr.c index 1eadb8b4fd..468ee7a3b1 100644 --- a/ext/-test-/string/cstr.c +++ b/ext/-test-/string/cstr.c @@ -42,11 +42,11 @@ bug_str_cstr_term_char(VALUE str) len = rb_enc_mbminlen(enc); c = rb_enc_precise_mbclen(s, s + len, enc); if (!MBCLEN_CHARFOUND_P(c)) { - c = (unsigned char)*s; + c = (unsigned char)*s; } else { - c = rb_enc_mbc_to_codepoint(s, s + len, enc); - if (!c) return Qnil; + c = rb_enc_mbc_to_codepoint(s, s + len, enc); + if (!c) return Qnil; } return rb_enc_uint_chr((unsigned int)c, enc); } @@ -65,14 +65,14 @@ bug_str_unterminated_substring(VALUE str, VALUE vbeg, VALUE vlen) #if USE_RVARGC RSTRING(str)->as.embed.len = (short)len; #else - RSTRING(str)->basic.flags &= ~RSTRING_EMBED_LEN_MASK; - RSTRING(str)->basic.flags |= len << RSTRING_EMBED_LEN_SHIFT; + RSTRING(str)->basic.flags &= ~RSTRING_EMBED_LEN_MASK; + RSTRING(str)->basic.flags |= len << RSTRING_EMBED_LEN_SHIFT; #endif memmove(RSTRING(str)->as.embed.ary, RSTRING(str)->as.embed.ary + beg, len); } else { - RSTRING(str)->as.heap.ptr += beg; - RSTRING(str)->as.heap.len = len; + RSTRING(str)->as.heap.ptr += beg; + RSTRING(str)->as.heap.len = len; } return str; } @@ -104,7 +104,7 @@ bug_str_s_cstr_term_char(VALUE self, VALUE str) const int term_fill_len = (termlen);\ *term_fill_ptr = '\0';\ if (UNLIKELY(term_fill_len > 1))\ - memset(term_fill_ptr, 0, term_fill_len);\ + memset(term_fill_ptr, 0, term_fill_len);\ } while (0) static VALUE |