summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bignum.c8
-rw-r--r--encoding.c2
-rw-r--r--gc.c2
-rw-r--r--hash.c2
-rw-r--r--io.c2
-rw-r--r--re.c10
-rw-r--r--regerror.c22
-rw-r--r--regexec.c4
-rw-r--r--strftime.c4
-rw-r--r--string.c2
-rw-r--r--time.c2
-rw-r--r--transcode.c2
-rw-r--r--util.c4
-rw-r--r--variable.c2
-rw-r--r--vm_method.c2
15 files changed, 35 insertions, 35 deletions
diff --git a/bignum.c b/bignum.c
index d1c9820ee7..f6fca9f546 100644
--- a/bignum.c
+++ b/bignum.c
@@ -1904,8 +1904,8 @@ bigmul1_karatsuba(VALUE x, VALUE y)
if (!BIGZEROP(xl) && !BIGZEROP(yl)) {
/* t2 <- xl * yl */
- t2 = bigmul0(xl, yl);
- t2n = big_real_len(t2);
+ t2 = bigmul0(xl, yl);
+ t2n = big_real_len(t2);
/* copy t2 into low bytes of the result (z0) */
MEMCPY(zds, BDIGITS(t2), BDIGIT, t2n);
@@ -2013,7 +2013,7 @@ dump_bignum(VALUE x)
long i;
printf("0x0");
for (i = RBIGNUM_LEN(x); i--; ) {
- printf("_%08x", BDIGITS(x)[i]);
+ printf("_%08x", BDIGITS(x)[i]);
}
puts("");
}
@@ -2041,7 +2041,7 @@ bigmul0(VALUE x, VALUE y)
normal:
if (x == y) return bigsqr_fast(x);
if (xn == 1 && yn == 1) return bigmul1_single(x, y);
- return bigmul1_normal(x, y);
+ return bigmul1_normal(x, y);
}
/* normal multiplication when x or y is a sparse bignum */
diff --git a/encoding.c b/encoding.c
index bd73880944..38d81b8e2f 100644
--- a/encoding.c
+++ b/encoding.c
@@ -664,7 +664,7 @@ rb_enc_associate_index(VALUE obj, int idx)
{
/* enc_check_capable(obj);*/
if (rb_enc_get_index(obj) == idx)
- return obj;
+ return obj;
if (SPECIAL_CONST_P(obj)) {
rb_raise(rb_eArgError, "cannot set encoding");
}
diff --git a/gc.c b/gc.c
index 9de079be14..40212204a3 100644
--- a/gc.c
+++ b/gc.c
@@ -1009,7 +1009,7 @@ rb_newobj_from_heap(rb_objspace_t *objspace)
VALUE obj;
if ((ruby_gc_stress && !ruby_disable_gc_stress) || !freelist) {
- if (!heaps_increment(objspace) && !garbage_collect(objspace)) {
+ if (!heaps_increment(objspace) && !garbage_collect(objspace)) {
during_gc = 0;
rb_memerror();
}
diff --git a/hash.c b/hash.c
index 497eda918b..321f7a7375 100644
--- a/hash.c
+++ b/hash.c
@@ -193,7 +193,7 @@ static VALUE
hash_foreach_call(struct hash_foreach_arg *arg)
{
if (st_foreach(RHASH(arg->hash)->ntbl, hash_foreach_iter, (st_data_t)arg)) {
- rb_raise(rb_eRuntimeError, "hash modified during iteration");
+ rb_raise(rb_eRuntimeError, "hash modified during iteration");
}
return Qnil;
}
diff --git a/io.c b/io.c
index 7acd28571b..643455eca5 100644
--- a/io.c
+++ b/io.c
@@ -5648,7 +5648,7 @@ io_reopen(VALUE io, VALUE nfile)
nfile = rb_io_get_io(nfile);
if (rb_safe_level() >= 4 &&
- (!OBJ_UNTRUSTED(io) || !OBJ_UNTRUSTED(nfile))) {
+ (!OBJ_UNTRUSTED(io) || !OBJ_UNTRUSTED(nfile))) {
rb_raise(rb_eSecurityError, "Insecure: can't reopen");
}
GetOpenFile(io, fptr);
diff --git a/re.c b/re.c
index 975bbbe2cf..0f8ff7a67f 100644
--- a/re.c
+++ b/re.c
@@ -113,7 +113,7 @@ rb_memsearch_ss(const unsigned char *xs, long m, const unsigned char *ys, long n
if (m > SIZEOF_VALUE)
rb_bug("!!too long pattern string!!");
- /* Prepare hash value */
+ /* Prepare hash value */
for (hx = *x++, hy = *y++; x < xe; ++x, ++y) {
hx <<= CHAR_BIT;
hy <<= CHAR_BIT;
@@ -356,7 +356,7 @@ rb_reg_expr_str(VALUE str, const char *s, long len)
}
else if (c == -1) {
int l = mbclen(p, pend, enc);
- rb_str_buf_cat(str, p, l);
+ rb_str_buf_cat(str, p, l);
p += l;
continue;
}
@@ -526,9 +526,9 @@ rb_reg_to_s(VALUE re)
rb_enc_get(re),
OnigDefaultSyntax);
if (r == 0) {
- ++ptr;
- len -= 2;
- err = (onig_compile(rp, ptr, ptr + len, NULL, NULL, 0) != 0);
+ ++ptr;
+ len -= 2;
+ err = (onig_compile(rp, ptr, ptr + len, NULL, NULL, 0) != 0);
}
onig_free(rp);
}
diff --git a/regerror.c b/regerror.c
index a9d0eb647d..3c8b7371c2 100644
--- a/regerror.c
+++ b/regerror.c
@@ -205,17 +205,17 @@ static int to_ascii(OnigEncoding enc, UChar *s, UChar *end,
while (p < end) {
code = ONIGENC_MBC_TO_CODE(enc, p, end);
if (code >= 0x80) {
- if (code > 0xffff && len + 10 <= buf_size) {
- sprint_byte_with_x((char*)(&(buf[len])), (unsigned int)(code >> 24));
- sprint_byte((char*)(&(buf[len+4])), (unsigned int)(code >> 16));
- sprint_byte((char*)(&(buf[len+6])), (unsigned int)(code >> 8));
- sprint_byte((char*)(&(buf[len+8])), (unsigned int)code);
- len += 10;
- }
- else if (len + 6 <= buf_size) {
- sprint_byte_with_x((char*)(&(buf[len])), (unsigned int)(code >> 8));
- sprint_byte((char*)(&(buf[len+4])), (unsigned int)code);
- len += 6;
+ if (code > 0xffff && len + 10 <= buf_size) {
+ sprint_byte_with_x((char*)(&(buf[len])), (unsigned int)(code >> 24));
+ sprint_byte((char*)(&(buf[len+4])), (unsigned int)(code >> 16));
+ sprint_byte((char*)(&(buf[len+6])), (unsigned int)(code >> 8));
+ sprint_byte((char*)(&(buf[len+8])), (unsigned int)code);
+ len += 10;
+ }
+ else if (len + 6 <= buf_size) {
+ sprint_byte_with_x((char*)(&(buf[len])), (unsigned int)(code >> 8));
+ sprint_byte((char*)(&(buf[len+4])), (unsigned int)code);
+ len += 6;
}
else {
break;
diff --git a/regexec.c b/regexec.c
index cfe28836ba..9fb5ff5dab 100644
--- a/regexec.c
+++ b/regexec.c
@@ -879,7 +879,7 @@ stack_double(OnigStackType** arg_stk_base, OnigStackType** arg_stk_end,
}\
k++;\
}\
- break;\
+ break;\
}\
}\
}\
@@ -920,7 +920,7 @@ stack_double(OnigStackType** arg_stk_base, OnigStackType** arg_stk_end,
}\
k++;\
}\
- break;\
+ break;\
}\
}\
else {\
diff --git a/strftime.c b/strftime.c
index 6ad74de085..0ffe6f2bbe 100644
--- a/strftime.c
+++ b/strftime.c
@@ -521,7 +521,7 @@ rb_strftime(char *s, size_t maxsize, const char *format, const struct vtm *vtm,
* live without, but it would be a great help to those of
* us that muck around with various message processors.
*/
- case 'z': /* time zone offset east of GMT e.g. -0600 */
+ case 'z': /* time zone offset east of GMT e.g. -0600 */
if (precision < 4) precision = 4;
NEEDS(precision + 1);
if (gmt) {
@@ -949,7 +949,7 @@ iso8601wknum(const struct tm *timeptr)
* and that
* timeptr->tm_wday MOD 7 == timeptr->tm_wday
* from which it follows that. . .
- */
+ */
jan1day = timeptr->tm_wday - (timeptr->tm_yday % 7);
if (jan1day < 0)
jan1day += 7;
diff --git a/string.c b/string.c
index 381c8528ac..a722ac14b0 100644
--- a/string.c
+++ b/string.c
@@ -3902,7 +3902,7 @@ rb_str_reverse_bang(VALUE str)
while (s < e) {
c = *s;
*s++ = *e;
- *e-- = c;
+ *e-- = c;
}
}
else {
diff --git a/time.c b/time.c
index 0967fd6a8a..8d64388090 100644
--- a/time.c
+++ b/time.c
@@ -3554,7 +3554,7 @@ time_strftime(VALUE time, VALUE format)
}
else {
len = rb_strftime_alloc(&buf, RSTRING_PTR(format),
- &tobj->vtm, rb_time_unmagnify(tobj->timexv), TIME_UTC_P(tobj));
+ &tobj->vtm, rb_time_unmagnify(tobj->timexv), TIME_UTC_P(tobj));
}
str = rb_str_new(buf, len);
if (buf != buffer) xfree(buf);
diff --git a/transcode.c b/transcode.c
index 01f3245742..b45d2397ab 100644
--- a/transcode.c
+++ b/transcode.c
@@ -675,7 +675,7 @@ transcode_restartable0(const unsigned char **in_pos, unsigned char **out_pos,
case UNDEF:
goto undef;
default:
- rb_raise(rb_eRuntimeError, "unknown transcoding instruction");
+ rb_raise(rb_eRuntimeError, "unknown transcoding instruction");
}
continue;
diff --git a/util.c b/util.c
index df20a1cd35..5ebc5f3e87 100644
--- a/util.c
+++ b/util.c
@@ -291,7 +291,7 @@ ruby_add_suffix(VALUE str, const char *suffix)
while ((*t = *s) && *s != '.') {
baselen++;
if (*s == '\\' || *s == '/') baselen = 0;
- s++; t++;
+ s++; t++;
}
p = t;
@@ -309,7 +309,7 @@ ruby_add_suffix(VALUE str, const char *suffix)
ext[++extlen] = '\0';
}
else if (baselen < 8) {
- *p++ = *suffix;
+ *p++ = *suffix;
}
else if (ext[3] != *suffix) {
ext[3] = *suffix;
diff --git a/variable.c b/variable.c
index 779a8e8280..b3f62444d2 100644
--- a/variable.c
+++ b/variable.c
@@ -784,7 +784,7 @@ rb_alias_variable(ID name1, ID name2)
entry2 = rb_global_entry(name2);
if (!st_lookup(rb_global_tbl, (st_data_t)name1, &data1)) {
- entry1 = ALLOC(struct global_entry);
+ entry1 = ALLOC(struct global_entry);
entry1->id = name1;
st_add_direct(rb_global_tbl, name1, (st_data_t)entry1);
}
diff --git a/vm_method.c b/vm_method.c
index 215db50080..9e5418afc3 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -154,7 +154,7 @@ rb_add_method_def(VALUE klass, ID mid, rb_method_type_t type, rb_method_definiti
klass = rb_cObject;
}
if (rb_safe_level() >= 4 &&
- (klass == rb_cObject || !OBJ_UNTRUSTED(klass))) {
+ (klass == rb_cObject || !OBJ_UNTRUSTED(klass))) {
rb_raise(rb_eSecurityError, "Insecure: can't define method");
}
if (!FL_TEST(klass, FL_SINGLETON) &&