diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-10 11:57:07 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-10 11:57:07 +0000 |
commit | ba75dd6b95793e3a8476dc8e112ea98961d5a183 (patch) | |
tree | 231c3356d64d66db42a98c3182798907c73e9f70 /ext | |
parent | df0f575e1d1359c75230ab1b70b7ed3059f77306 (diff) | |
download | ruby-ba75dd6b95793e3a8476dc8e112ea98961d5a183.tar.gz |
* 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
Diffstat (limited to 'ext')
-rw-r--r-- | ext/socket/ancdata.c | 6 |
1 files changed, 2 insertions, 4 deletions
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 = ","; |