diff options
author | Khem Raj <raj.khem@gmail.com> | 2019-12-27 11:43:42 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2019-12-28 00:11:47 -0800 |
commit | bbb5732a4f96c754a864f2e306f3df69df621660 (patch) | |
tree | bbd3468a52b8ca75ccfa1b286d8717f1f583696f | |
parent | 81a7c640a96c3d8fb94632a973f814506a1d0f75 (diff) | |
download | meta-openembedded-bbb5732a4f96c754a864f2e306f3df69df621660.tar.gz |
opensc: Fix misaligned indentation
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-oe/recipes-support/opensc/opensc/0001-Fix-misleading-code-indentation.patch | 69 | ||||
-rw-r--r-- | meta-oe/recipes-support/opensc/opensc_0.19.0.bb | 1 |
2 files changed, 70 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/opensc/opensc/0001-Fix-misleading-code-indentation.patch b/meta-oe/recipes-support/opensc/opensc/0001-Fix-misleading-code-indentation.patch new file mode 100644 index 0000000000..eb71b9d766 --- /dev/null +++ b/meta-oe/recipes-support/opensc/opensc/0001-Fix-misleading-code-indentation.patch | |||
@@ -0,0 +1,69 @@ | |||
1 | From 283578519ec83a8792b026c10322789784d629de Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 27 Dec 2019 11:33:57 -0800 | ||
4 | Subject: [PATCH] Fix misleading code indentation | ||
5 | |||
6 | Fixes | ||
7 | error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation] | ||
8 | if(cipher) | ||
9 | ^ | ||
10 | ../../../git/src/libopensc/card-entersafe.c:369:2: note: previous statement is here | ||
11 | if(sbuf) | ||
12 | ^ | ||
13 | Upstream-Status: Submitted [https://github.com/OpenSC/OpenSC/pull/1894] | ||
14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
15 | --- | ||
16 | src/libopensc/card-entersafe.c | 12 ++++++------ | ||
17 | src/tools/pkcs15-init.c | 4 ++-- | ||
18 | 2 files changed, 8 insertions(+), 8 deletions(-) | ||
19 | |||
20 | diff --git a/src/libopensc/card-entersafe.c b/src/libopensc/card-entersafe.c | ||
21 | index 3e42c11f..abb9fd81 100644 | ||
22 | --- a/src/libopensc/card-entersafe.c | ||
23 | +++ b/src/libopensc/card-entersafe.c | ||
24 | @@ -352,10 +352,10 @@ static int entersafe_transmit_apdu(sc_card_t *card, sc_apdu_t *apdu, | ||
25 | size_t cipher_data_size,mac_data_size; | ||
26 | int blocks; | ||
27 | int r=SC_SUCCESS; | ||
28 | - u8 *sbuf=NULL; | ||
29 | - size_t ssize=0; | ||
30 | + u8 *sbuf=NULL; | ||
31 | + size_t ssize=0; | ||
32 | |||
33 | - SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE); | ||
34 | + SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE); | ||
35 | |||
36 | assert(card); | ||
37 | assert(apdu); | ||
38 | @@ -363,10 +363,10 @@ static int entersafe_transmit_apdu(sc_card_t *card, sc_apdu_t *apdu, | ||
39 | if((cipher||mac) && (!key||(keylen!=8 && keylen!=16))) | ||
40 | SC_FUNC_RETURN(card->ctx, SC_LOG_DEBUG_VERBOSE, SC_ERROR_INVALID_ARGUMENTS); | ||
41 | |||
42 | - r = sc_apdu_get_octets(card->ctx, apdu, &sbuf, &ssize, SC_PROTO_RAW); | ||
43 | - if (r == SC_SUCCESS) | ||
44 | + r = sc_apdu_get_octets(card->ctx, apdu, &sbuf, &ssize, SC_PROTO_RAW); | ||
45 | + if (r == SC_SUCCESS) | ||
46 | sc_apdu_log(card->ctx, SC_LOG_DEBUG_VERBOSE, sbuf, ssize, 1); | ||
47 | - if(sbuf) | ||
48 | + if(sbuf) | ||
49 | free(sbuf); | ||
50 | |||
51 | if(cipher) | ||
52 | diff --git a/src/tools/pkcs15-init.c b/src/tools/pkcs15-init.c | ||
53 | index 1ce79f45..9a73121c 100644 | ||
54 | --- a/src/tools/pkcs15-init.c | ||
55 | +++ b/src/tools/pkcs15-init.c | ||
56 | @@ -2311,8 +2311,8 @@ do_read_private_key(const char *filename, const char *format, | ||
57 | r = util_getpass(&passphrase, &len, stdin); | ||
58 | if (r < 0 || !passphrase) | ||
59 | return SC_ERROR_INTERNAL; | ||
60 | - r = do_read_pkcs12_private_key(filename, | ||
61 | - passphrase, pk, certs, max_certs); | ||
62 | + r = do_read_pkcs12_private_key(filename, | ||
63 | + passphrase, pk, certs, max_certs); | ||
64 | } | ||
65 | } else { | ||
66 | util_error("Error when reading private key. " | ||
67 | -- | ||
68 | 2.24.1 | ||
69 | |||
diff --git a/meta-oe/recipes-support/opensc/opensc_0.19.0.bb b/meta-oe/recipes-support/opensc/opensc_0.19.0.bb index 006a1b6b29..0d744e213b 100644 --- a/meta-oe/recipes-support/opensc/opensc_0.19.0.bb +++ b/meta-oe/recipes-support/opensc/opensc_0.19.0.bb | |||
@@ -15,6 +15,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34" | |||
15 | SRCREV = "f1691fc91fc113191c3a8aaf5facd6983334ec47" | 15 | SRCREV = "f1691fc91fc113191c3a8aaf5facd6983334ec47" |
16 | SRC_URI = "git://github.com/OpenSC/OpenSC \ | 16 | SRC_URI = "git://github.com/OpenSC/OpenSC \ |
17 | file://0001-Remove-redundant-logging.patch \ | 17 | file://0001-Remove-redundant-logging.patch \ |
18 | file://0001-Fix-misleading-code-indentation.patch \ | ||
18 | " | 19 | " |
19 | DEPENDS = "virtual/libiconv openssl" | 20 | DEPENDS = "virtual/libiconv openssl" |
20 | 21 | ||