summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl.c
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-16 09:39:54 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-16 09:39:54 +0000
commit67f4a393ba15b8dff5a0d442670a3c9b6b921931 (patch)
treebd00d13137168efd7867f39df45264a7ff956844 /ext/openssl/ossl.c
parenta247c7715db3ee30bb030eeafc08cedf9c43cf15 (diff)
* ext/openssl/ossl.c (ossl_raise): refine message format.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl.c')
-rw-r--r--ext/openssl/ossl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c
index 133b4e3..41659f0 100644
--- a/ext/openssl/ossl.c
+++ b/ext/openssl/ossl.c
@@ -292,7 +292,8 @@ ossl_raise(VALUE exc, const char *fmt, ...)
else
msg = ERR_reason_error_string(e);
ERR_clear_error();
- len += snprintf(buf+len, BUFSIZ-len, ": %s", msg);
+ fmt = len ? ": %s" : "%s";
+ len += snprintf(buf+len, BUFSIZ-len, fmt, msg);
}
if(len > BUFSIZ) len = strlen(buf);