Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/do_postgres/ext/do_postgres.c b/do_postgres/ext/do_postgres.c
- index 7381357..9c88923 100644
- --- a/do_postgres/ext/do_postgres.c
- +++ b/do_postgres/ext/do_postgres.c
- @@ -192,13 +192,13 @@ VALUE cConnection_initialize(VALUE self, VALUE uri) {
- }
- VALUE r_user = rb_funcall(uri, rb_intern("user"), 0);
- - char * user = "postgres";
- + char * user = NULL;
- if (Qnil != r_user) {
- user = StringValuePtr(r_user);
- }
- VALUE r_password = rb_funcall(uri, rb_intern("password"), 0);
- - char * password = "";
- + char * password = NULL;
- if (Qnil != r_password) {
- password = StringValuePtr(r_password);
- }
- @@ -467,4 +467,4 @@ void Init_do_postgres() {
- rb_define_method(cReader, "values", cReader_values, 0);
- rb_define_method(cReader, "fields", cReader_fields, 0);
- -}
- \ No newline at end of file
- +}
Add Comment
Please, Sign In to add comment