summaryrefslogtreecommitdiff
path: root/ext/etc
diff options
context:
space:
mode:
authorcharliesome <charliesome@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-22 04:46:47 +0000
committercharliesome <charliesome@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-22 04:46:47 +0000
commitff0e82ed9db1e8ed1f95b5329bf3fd7bd778f828 (patch)
tree62a3e78f6518cc4a4c9c93147b5eca87a7aebf44 /ext/etc
parentd0690f97dedc97471968ea6f6d6517cf2e7dd9f1 (diff)
* ext/etc/etc.c (etc_getpwnam): use PRIsVALUE in format string instead
of %s and RSTRING_PTR * ext/etc/etc.c (etc_getgrnam): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/etc')
-rw-r--r--ext/etc/etc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/etc/etc.c b/ext/etc/etc.c
index 74a1fed..de06c74 100644
--- a/ext/etc/etc.c
+++ b/ext/etc/etc.c
@@ -183,7 +183,7 @@ etc_getpwnam(VALUE obj, VALUE nam)
SafeStringValue(nam);
pwd = getpwnam(RSTRING_PTR(nam));
- if (pwd == 0) rb_raise(rb_eArgError, "can't find user for %s", RSTRING_PTR(nam));
+ if (pwd == 0) rb_raise(rb_eArgError, "can't find user for %"PRIsVALUE, nam);
return setup_passwd(pwd);
#else
return Qnil;
@@ -426,7 +426,7 @@ etc_getgrnam(VALUE obj, VALUE nam)
SafeStringValue(nam);
grp = getgrnam(RSTRING_PTR(nam));
- if (grp == 0) rb_raise(rb_eArgError, "can't find group for %s", RSTRING_PTR(nam));
+ if (grp == 0) rb_raise(rb_eArgError, "can't find group for %"PRIsVALUE, nam);
return setup_group(grp);
#else
return Qnil;