diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-02-10 11:45:14 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-02-10 11:45:14 +0000 |
commit | 565d568a45855f138364c414ea266b3fd80ec05c (patch) | |
tree | 4de0568b654911049defc04edd184cb7bb0d34dd /ext/zlib | |
parent | 73fc780998054e9ca4835b784b6fc9051f83332f (diff) |
merge revision(s) 44572,44578,44591,44592: [Backport #9490]
ext: use rb_sprintf() and rb_vsprintf() with PRIsVALUE
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@44903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/zlib')
-rw-r--r-- | ext/zlib/zlib.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index df2a2501b2..391bec1722 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); |