You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.1 KiB

  1. From a099f951d085d3abfefeead14a4af06913cb67d2 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/18] Move declaration to top of block.
  6. ---
  7. src/libopensc/card-openpgp.c | 3 ++-
  8. 1 file changed, 2 insertions(+), 1 deletion(-)
  9. diff --git a/src/libopensc/card-openpgp.c b/src/libopensc/card-openpgp.c
  10. index c4ef3b6..7f2006e 100644
  11. --- a/src/libopensc/card-openpgp.c
  12. +++ b/src/libopensc/card-openpgp.c
  13. @@ -736,6 +736,7 @@ pgp_read_blob(sc_card_t *card, struct blob *blob)
  14. u8 buffer[2048];
  15. size_t buf_len = (card->caps & SC_CARD_CAP_APDU_EXT)
  16. ? sizeof(buffer) : 256;
  17. + int r = SC_SUCCESS;
  18. /* Buffer length for certificate */
  19. if (blob->id == DO_CERT && priv->max_cert_size > 0) {
  20. @@ -749,7 +750,7 @@ pgp_read_blob(sc_card_t *card, struct blob *blob)
  21. buf_len = MAXLEN_RESP_PUBKEY_GNUK;
  22. }
  23. - int r = blob->info->get_fn(card, blob->id, buffer, buf_len);
  24. + r = blob->info->get_fn(card, blob->id, buffer, buf_len);
  25. if (r < 0) { /* an error occurred */
  26. blob->status = r;
  27. --
  28. 1.9.3