[前][次][番号順一覧][スレッド一覧]

ruby-changes:43146

From: nobu <ko1@a...>
Date: Mon, 30 May 2016 23:05:42 +0900 (JST)
Subject: [ruby-changes:43146] nobu:r55220 (trunk): raddrinfo.c: fix modifier

nobu	2016-05-30 23:05:36 +0900 (Mon, 30 May 2016)

  New Revision: 55220

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55220

  Log:
    raddrinfo.c: fix modifier
    
    * ext/socket/raddrinfo.c (host_str, port_str): fix length modifier
      to size_t.

  Modified files:
    trunk/ext/socket/raddrinfo.c
Index: ext/socket/raddrinfo.c
===================================================================
--- ext/socket/raddrinfo.c	(revision 55219)
+++ ext/socket/raddrinfo.c	(revision 55220)
@@ -458,7 +458,7 @@ host_str(VALUE host, char *hbuf, size_t https://github.com/ruby/ruby/blob/trunk/ext/socket/raddrinfo.c#L458
             if (flags_ptr) *flags_ptr |= AI_NUMERICHOST;
         }
         else if (len >= hbuflen) {
-            rb_raise(rb_eArgError, "hostname too long (%ld)",
+            rb_raise(rb_eArgError, "hostname too long (%"PRIdSIZE")",
                      len);
         }
         else {
@@ -489,7 +489,7 @@ port_str(VALUE port, char *pbuf, size_t https://github.com/ruby/ruby/blob/trunk/ext/socket/raddrinfo.c#L489
         SafeStringValue(port);
         RSTRING_GETMEM(port, serv, len);
         if (len >= pbuflen) {
-            rb_raise(rb_eArgError, "service name too long (%ld)",
+            rb_raise(rb_eArgError, "service name too long (%"PRIdSIZE")",
                      len);
         }
         memcpy(pbuf, serv, len);

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]