From 3f56949401549b639cc1db62d7e8d24807d504d7 Mon Sep 17 00:00:00 2001 From: usa Date: Tue, 6 Apr 2004 04:13:24 +0000 Subject: [PATCH] * ext/socket/socket.c (raise_socket_error): never return. * ext/socket/socket.c (make_hostent): must return value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ ext/socket/socket.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) 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