1
0
Fork 0
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:
Nobuyoshi Nakada 2022-11-09 11:58:37 +09:00
parent 5d95cd99f4
commit ef1c1ddf68
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -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;