Skip to content

Commit 46fa2cf

Browse files
committed
Remove needless return
1 parent 7cd2b28 commit 46fa2cf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ext/mysql2/client.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ static VALUE rb_connect(VALUE self, VALUE user, VALUE pass, VALUE host, VALUE po
373373
if (wrapper->connect_timeout)
374374
mysql_options(wrapper->client, MYSQL_OPT_CONNECT_TIMEOUT, &wrapper->connect_timeout);
375375
if (rv == Qfalse)
376-
return rb_raise_mysql2_error(wrapper);
376+
rb_raise_mysql2_error(wrapper);
377377
}
378378

379379
wrapper->server_version = mysql_get_server_version(wrapper->client);
@@ -419,7 +419,7 @@ static VALUE do_send_query(void *args) {
419419
if ((VALUE)rb_thread_call_without_gvl(nogvl_send_query, args, RUBY_UBF_IO, 0) == Qfalse) {
420420
/* an error occurred, we're not active anymore */
421421
wrapper->active_thread = Qnil;
422-
return rb_raise_mysql2_error(wrapper);
422+
rb_raise_mysql2_error(wrapper);
423423
}
424424
return Qnil;
425425
}
@@ -481,7 +481,7 @@ static VALUE rb_mysql_client_async_result(VALUE self) {
481481
if ((VALUE)rb_thread_call_without_gvl(nogvl_read_query_result, wrapper->client, RUBY_UBF_IO, 0) == Qfalse) {
482482
/* an error occurred, mark this connection inactive */
483483
wrapper->active_thread = Qnil;
484-
return rb_raise_mysql2_error(wrapper);
484+
rb_raise_mysql2_error(wrapper);
485485
}
486486

487487
is_streaming = rb_hash_aref(rb_iv_get(self, "@current_query_options"), sym_stream);
@@ -1228,7 +1228,7 @@ static VALUE initialize_ext(VALUE self) {
12281228

12291229
if ((VALUE)rb_thread_call_without_gvl(nogvl_init, wrapper, RUBY_UBF_IO, 0) == Qfalse) {
12301230
/* TODO: warning - not enough memory? */
1231-
return rb_raise_mysql2_error(wrapper);
1231+
rb_raise_mysql2_error(wrapper);
12321232
}
12331233

12341234
wrapper->initialized = 1;

0 commit comments

Comments
 (0)