Merge pull request #840 from cjkoenig/update_liburcu
[feed/packages.git] / utils / opensc / patches / 0018-Move-declaration-to-top-of-block.patch
1 From c84c84169f7a73eab27f6a9b13b77432baa5c3f8 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?=
3 <ng.hong.quan@gmail.com>
4 Date: Wed, 8 May 2013 16:51:21 +0700
5 Subject: [PATCH 18/26] Move declaration to top of block.
6
7 ---
8 src/libopensc/card-openpgp.c | 3 ++-
9 1 file changed, 2 insertions(+), 1 deletion(-)
10
11 diff --git a/src/libopensc/card-openpgp.c b/src/libopensc/card-openpgp.c
12 index ca0d01b..037ef73 100644
13 --- a/src/libopensc/card-openpgp.c
14 +++ b/src/libopensc/card-openpgp.c
15 @@ -738,6 +738,7 @@ pgp_read_blob(sc_card_t *card, struct blob *blob)
16 u8 buffer[2048];
17 size_t buf_len = (card->caps & SC_CARD_CAP_APDU_EXT)
18 ? sizeof(buffer) : 256;
19 + int r = SC_SUCCESS;
20
21 /* Buffer length for certificate */
22 if (blob->id == DO_CERT && priv->max_cert_size > 0) {
23 @@ -751,7 +752,7 @@ pgp_read_blob(sc_card_t *card, struct blob *blob)
24 buf_len = MAXLEN_RESP_PUBKEY_GNUK;
25 }
26
27 - int r = blob->info->get_fn(card, blob->id, buffer, buf_len);
28 + r = blob->info->get_fn(card, blob->id, buffer, buf_len);
29
30 if (r < 0) { /* an error occurred */
31 blob->status = r;
32 --
33 2.1.3
34