From 3d2ddca6b2d859c66fdd2498c564a86740969ded Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 29 Dec 2002 20:14:51 +0000 Subject: [PATCH] * ext/socket/socket.c (tcp_svr_init): local host to init_inetsock() is VALUE but not pointer. * ext/socket/socket.c (sock_s_unpack_sockaddr_in): get rid of gcc-3 -O3 warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 8 ++++++++ ext/socket/socket.c | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 64d75e6c26..49c8c6ec68 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Mon Dec 30 05:10:00 2002 Nobuyoshi Nakada + + * ext/socket/socket.c (tcp_svr_init): local host to + init_inetsock() is VALUE but not pointer. + + * ext/socket/socket.c (sock_s_unpack_sockaddr_in): get rid of + gcc-3 -O3 warning. + Sun Dec 29 23:45:53 2002 Nobuyoshi Nakada * gc.c (gc_sweep): adjust GC trigger. diff --git a/ext/socket/socket.c b/ext/socket/socket.c index 8378368313..d0838b1580 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -1129,9 +1129,9 @@ tcp_svr_init(argc, argv, sock) VALUE arg1, arg2; if (rb_scan_args(argc, argv, "11", &arg1, &arg2) == 2) - return init_inetsock(sock, arg1, arg2, NULL, Qnil, INET_SERVER); + return init_inetsock(sock, arg1, arg2, Qnil, Qnil, INET_SERVER); else - return init_inetsock(sock, Qnil, arg1, NULL, Qnil, INET_SERVER); + return init_inetsock(sock, Qnil, arg1, Qnil, Qnil, INET_SERVER); } static VALUE @@ -2334,7 +2334,7 @@ sock_s_unpack_sockaddr_in(self, addr) rb_raise(rb_eTypeError, "sockaddr_in size differs - %ld required; %d given", RSTRING(addr)->len, sizeof(struct sockaddr_in)); } - host = mkipaddr(sockaddr); + host = mkipaddr((struct sockaddr*)sockaddr); OBJ_INFECT(host, addr); return rb_assoc_new(INT2NUM(ntohs(sockaddr->sin_port)), host); }