diff options
-rw-r--r-- | module/cryptoki-log.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/module/cryptoki-log.c b/module/cryptoki-log.c index f6555f5..c03a016 100644 --- a/module/cryptoki-log.c +++ b/module/cryptoki-log.c @@ -141,7 +141,7 @@ cklog(const char* msg, ...) #ifdef _WIN32 _vsnprintf(the_line_buf + l, LINE_BUF_LEN - l, msg, va); #else - snprintf(the_line_buf + l, LINE_BUF_LEN - l, msg, va); + vsnprintf(the_line_buf + l, LINE_BUF_LEN - l, msg, va); #endif the_line_buf[LINE_BUF_LEN - 1] = 0; @@ -298,7 +298,7 @@ log_byte_array (const char *pref, const char *name, CK_BYTE_PTR arr, } else if (arr == NULL) { cklog ("(%d) NOTHING\n", *num); } else { - cklog ("(%d) "); + cklog ("(%d) ", *num); log_some_bytes (arr, *num); cklog ("\n"); } @@ -377,7 +377,7 @@ log_mechanism (const char *pref, const char *name, CK_MECHANISM_PTR mech, CK_RV log_CKM (mech->mechanism); cklog (", pParameter: (%d) ", mech->ulParameterLen); log_some_bytes (mech->pParameter, mech->ulParameterLen); - cklog ("\n"); + cklog (" }\n"); } static void @@ -415,7 +415,7 @@ log_mechanism_type_array (const char *pref, const char *name, CK_MECHANISM_TYPE_ cklog (", "); log_CKM(arr[i]); } - cklog ("]\n"); + cklog (" ]\n"); } } |