Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 1 | From c012f46965b3fe24e31367796e52c2d0b14ca5d9 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Mon, 17 Dec 2018 18:44:23 -0800 |
| 4 | Subject: [PATCH] Remove redundant logging |
| 5 | |
| 6 | Same information is printed a few line below in same function, the only |
| 7 | difference is that there it takes care of case when label is NULL pointer |
| 8 | unlike this line |
| 9 | |
| 10 | secondly, every function call to cosm_write_tokeninfo() in this file |
| 11 | passes label=NULL, and then it tries to print a null pointer |
| 12 | |
| 13 | Fixes errors like |
| 14 | src/libopensc/log.h:48:47: error: '%s' directive argument is null |
| 15 | [-Werror=format-overflow=] |
| 16 | |
| 17 | Upstream-Status: Submitted [https://github.com/OpenSC/OpenSC/pull/1557] |
| 18 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 19 | --- |
| 20 | src/pkcs15init/pkcs15-oberthur.c | 1 - |
| 21 | 1 file changed, 1 deletion(-) |
| 22 | |
| 23 | Index: git/src/pkcs15init/pkcs15-oberthur.c |
| 24 | =================================================================== |
| 25 | --- git.orig/src/pkcs15init/pkcs15-oberthur.c |
| 26 | +++ git/src/pkcs15init/pkcs15-oberthur.c |
| 27 | @@ -70,7 +70,6 @@ cosm_write_tokeninfo (struct sc_pkcs15_c |
| 28 | ctx = p15card->card->ctx; |
| 29 | |
| 30 | SC_FUNC_CALLED(ctx, SC_LOG_DEBUG_VERBOSE); |
| 31 | - sc_debug(ctx, SC_LOG_DEBUG_NORMAL, "cosm_write_tokeninfo() label '%s'; flags 0x%X", label, flags); |
| 32 | if (sc_profile_get_file(profile, COSM_TITLE"-token-info", &file)) { |
| 33 | rv = SC_ERROR_INCONSISTENT_PROFILE; |
| 34 | SC_TEST_GOTO_ERR(ctx, SC_LOG_DEBUG_NORMAL, rv, "Cannot find "COSM_TITLE"-token-info"); |