ruby-changes:10637
From: nobu <ko1@a...>
Date: Tue, 10 Feb 2009 12:57:28 +0900 (JST)
Subject: [ruby-changes:10637] Ruby:r22195 (trunk): * ext/socket/option.c (inspect_local_peercred): constfied.
nobu 2009-02-10 12:57:23 +0900 (Tue, 10 Feb 2009) New Revision: 22195 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=22195 Log: * ext/socket/option.c (inspect_local_peercred): constfied. * ext/socket/ancdata.c (anc_inspect_socket_creds): ditto. Modified files: trunk/ext/socket/ancdata.c trunk/ext/socket/option.c Index: ext/socket/option.c =================================================================== --- ext/socket/option.c (revision 22194) +++ ext/socket/option.c (revision 22195) @@ -272,7 +272,7 @@ rb_str_catf(ret, " euid=%u", cred.cr_uid); if (cred.cr_ngroups) { int i; - char *sep = " groups="; + const char *sep = " groups="; for (i = 0; i < cred.cr_ngroups; i++) { rb_str_catf(ret, "%s%u", sep, cred.cr_groups[i]); sep = ","; Index: ext/socket/ancdata.c =================================================================== --- ext/socket/ancdata.c (revision 22194) +++ ext/socket/ancdata.c (revision 22195) @@ -433,7 +433,6 @@ static int anc_inspect_socket_creds(int level, int type, VALUE data, VALUE ret) { - int i; if (level != SOL_SOCKET && type != SCM_CREDS) return -1; @@ -457,7 +456,8 @@ rb_str_catf(ret, " euid=%u", cred.cmcred_euid); rb_str_catf(ret, " gid=%u", cred.cmcred_gid); if (cred.cmcred_ngroups) { - char *sep = "="; + int i; + const char *sep = "="; rb_str_cat2(ret, " groups"); for (i = 0; i < cred.cmcred_ngroups; i++) { rb_str_catf(ret, "%s%u", sep, cred.cmcred_groups[i]); @@ -480,7 +480,8 @@ rb_str_catf(ret, " gid=%u", cred->sc_gid); rb_str_catf(ret, " egid=%u", cred->sc_egid); if (cred0.sc_ngroups) { - char *sep = "="; + int i; + const char *sep = "="; rb_str_cat2(ret, " groups"); for (i = 0; i < cred0.sc_ngroups; i++) { rb_str_catf(ret, "%s%u", sep, cred->sc_groups[i]); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/