From ba75dd6b95793e3a8476dc8e112ea98961d5a183 Mon Sep 17 00:00:00 2001 From: akr Date: Tue, 10 Feb 2009 11:57:07 +0000 Subject: * ext/socket/ancdata.c (anc_inspect_socket_creds): refactored to avoid a rb_str_cat2 call. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ ext/socket/ancdata.c | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c4ce465425..739af6049c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Feb 10 20:56:07 2009 Tanaka Akira + + * ext/socket/ancdata.c (anc_inspect_socket_creds): refactored to avoid + a rb_str_cat2 call. + Tue Feb 10 04:34:38 2009 Nobuyoshi Nakada * configure.in (when): makes parentheses balanced. diff --git a/ext/socket/ancdata.c b/ext/socket/ancdata.c index 71c4dd8a9c..5e6920de1a 100644 --- a/ext/socket/ancdata.c +++ b/ext/socket/ancdata.c @@ -457,8 +457,7 @@ anc_inspect_socket_creds(int level, int type, VALUE data, VALUE ret) rb_str_catf(ret, " gid=%u", cred.cmcred_gid); if (cred.cmcred_ngroups) { int i; - const char *sep = "="; - rb_str_cat2(ret, " groups"); + const char *sep = " groups="; for (i = 0; i < cred.cmcred_ngroups; i++) { rb_str_catf(ret, "%s%u", sep, cred.cmcred_groups[i]); sep = ","; @@ -481,8 +480,7 @@ anc_inspect_socket_creds(int level, int type, VALUE data, VALUE ret) rb_str_catf(ret, " egid=%u", cred->sc_egid); if (cred0.sc_ngroups) { int i; - const char *sep = "="; - rb_str_cat2(ret, " groups"); + const char *sep = " groups="; for (i = 0; i < cred0.sc_ngroups; i++) { rb_str_catf(ret, "%s%u", sep, cred->sc_groups[i]); sep = ","; -- cgit v1.2.3