Skip to content

Commit daf61cd

Browse files
committed
fix warning: int is not a pointer.
1 parent 14975dc commit daf61cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/mysql2/client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ static VALUE rb_connect(VALUE self, VALUE user, VALUE pass, VALUE host, VALUE po
286286

287287
args.host = NIL_P(host) ? NULL : StringValuePtr(host);
288288
args.unix_socket = NIL_P(socket) ? NULL : StringValuePtr(socket);
289-
args.port = NIL_P(port) ? NULL : NUM2INT(port);
289+
args.port = NIL_P(port) ? 0 : NUM2INT(port);
290290
args.user = NIL_P(user) ? NULL : StringValuePtr(user);
291291
args.passwd = NIL_P(pass) ? NULL : StringValuePtr(pass);
292292
args.db = NIL_P(database) ? NULL : StringValuePtr(database);

0 commit comments

Comments
 (0)