blob: 291f1a239aa39c5fc153f10c0056e8c16bef0cc4 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001From c012f46965b3fe24e31367796e52c2d0b14ca5d9 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 17 Dec 2018 18:44:23 -0800
4Subject: [PATCH] Remove redundant logging
5
6Same information is printed a few line below in same function, the only
7difference is that there it takes care of case when label is NULL pointer
8unlike this line
9
10secondly, every function call to cosm_write_tokeninfo() in this file
11passes label=NULL, and then it tries to print a null pointer
12
13Fixes errors like
14src/libopensc/log.h:48:47: error: '%s' directive argument is null
15[-Werror=format-overflow=]
16
17Upstream-Status: Submitted [https://github.com/OpenSC/OpenSC/pull/1557]
18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19---
20 src/pkcs15init/pkcs15-oberthur.c | 1 -
21 1 file changed, 1 deletion(-)
22
23Index: 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");