diff --git a/ChangeLog b/ChangeLog index f0ab3b1db6..562de10a7d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Tue Apr 6 13:11:48 2004 NAKAMURA Usaku + + * ext/socket/socket.c (raise_socket_error): never return. + + * ext/socket/socket.c (make_hostent): must return value. + Tue Apr 6 00:14:43 2004 Yukihiro Matsumoto * error.c (Init_Exception): remove Exception#to_str. [Ruby2] diff --git a/ext/socket/socket.c b/ext/socket/socket.c index 72cf058a78..9e1d705521 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -528,6 +528,7 @@ bsock_do_not_rev_lookup_set(self, val) return val; } +NORETURN(static void raise_socket_error _((char *, int))); static void raise_socket_error(reason, error) char *reason; @@ -1143,14 +1144,13 @@ make_hostent(host, addr, ipaddr) struct addrinfo* addr; VALUE (*ipaddr)_((struct sockaddr*, size_t)); { - VALUE ary; struct hostent_arg arg; arg.host = host; arg.addr = addr; arg.ipaddr = ipaddr; - ary = rb_ensure(make_hostent_internal, (VALUE)&arg, - RUBY_METHOD_FUNC(freeaddrinfo), (VALUE)addr); + return rb_ensure(make_hostent_internal, (VALUE)&arg, + RUBY_METHOD_FUNC(freeaddrinfo), (VALUE)addr); } VALUE