mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Use rb_sprintf
instead of deprecated sprintf
This commit is contained in:
parent
5d95cd99f4
commit
ef1c1ddf68
1 changed files with 1 additions and 2 deletions
|
@ -618,8 +618,7 @@ rsock_ipaddr(struct sockaddr *sockaddr, socklen_t sockaddrlen, int norevlookup)
|
|||
family = rb_str_dup(rb_id2str(id));
|
||||
}
|
||||
else {
|
||||
sprintf(pbuf, "unknown:%d", sockaddr->sa_family);
|
||||
family = rb_str_new2(pbuf);
|
||||
family = rb_sprintf("unknown:%d", sockaddr->sa_family);
|
||||
}
|
||||
|
||||
addr1 = Qnil;
|
||||
|
|
Loading…
Reference in a new issue