summaryrefslogtreecommitdiff
path: root/ext/zlib/zlib.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-12 08:11:36 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-12 08:11:36 +0000
commit9bd672f6682aef683c49f0b8da2b439e4d4103ac (patch)
tree17a6f91b7e705c4ba7bf32e6ceadd136e7b595f5 /ext/zlib/zlib.c
parent42406852371bdf3fe3d2e4e51192c87720a8e568 (diff)
ext: use rb_sprintf() and rb_vsprintf() with PRIsVALUE
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/zlib/zlib.c')
-rw-r--r--ext/zlib/zlib.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index df2a250..391bec1 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -337,11 +337,8 @@ raise_zlib_error(int err, const char *msg)
rb_sys_fail(msg);
/* no return */
default:
- {
- char buf[BUFSIZ];
- snprintf(buf, BUFSIZ, "unknown zlib error %d: %s", err, msg);
- exc = rb_exc_new2(cZError, buf);
- }
+ exc = rb_exc_new_str(cZError,
+ rb_sprintf("unknown zlib error %d: %s", err, msg));
}
rb_exc_raise(exc);