aboutsummaryrefslogtreecommitdiff
path: root/libcacard/cac.c
diff options
context:
space:
mode:
authorMichael Tokarev <mjt@tls.msk.ru>2014-05-08 21:17:38 +0400
committerMichael Tokarev <mjt@tls.msk.ru>2014-05-26 10:41:22 +0400
commit1687a089f103f9b7a1b4a1555068054cb46ee9e9 (patch)
tree951e91aa9623aacb4f4f88480ad374826015baae /libcacard/cac.c
parent116d55460186d8568428072a5bbc355fb0129fce (diff)
downloadqemu-1687a089f103f9b7a1b4a1555068054cb46ee9e9.zip
qemu-1687a089f103f9b7a1b4a1555068054cb46ee9e9.tar.gz
qemu-1687a089f103f9b7a1b4a1555068054cb46ee9e9.tar.bz2
libcacard: remove useless initializers
libcacard has many functions which initializes local variables at declaration time, which are always assigned some values later (often right after declaration). Clean up these initializers. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'libcacard/cac.c')
-rw-r--r--libcacard/cac.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libcacard/cac.c b/libcacard/cac.c
index 3887896..0a0163d 100644
--- a/libcacard/cac.c
+++ b/libcacard/cac.c
@@ -93,8 +93,8 @@ cac_common_process_apdu(VCard *card, VCardAPDU *apdu, VCardResponse **response)
static VCardStatus
cac_applet_pki_reset(VCard *card, int channel)
{
- VCardAppletPrivate *applet_private = NULL;
- CACPKIAppletData *pki_applet = NULL;
+ VCardAppletPrivate *applet_private;
+ CACPKIAppletData *pki_applet;
applet_private = vcard_get_current_applet_private(card, channel);
assert(applet_private);
pki_applet = &(applet_private->u.pki_data);
@@ -113,8 +113,8 @@ static VCardStatus
cac_applet_pki_process_apdu(VCard *card, VCardAPDU *apdu,
VCardResponse **response)
{
- CACPKIAppletData *pki_applet = NULL;
- VCardAppletPrivate *applet_private = NULL;
+ CACPKIAppletData *pki_applet;
+ VCardAppletPrivate *applet_private;
int size, next;
unsigned char *sign_buffer;
vcard_7816_status_t status;
@@ -279,7 +279,7 @@ cac_applet_container_process_apdu(VCard *card, VCardAPDU *apdu,
static void
cac_delete_pki_applet_private(VCardAppletPrivate *applet_private)
{
- CACPKIAppletData *pki_applet_data = NULL;
+ CACPKIAppletData *pki_applet_data;
if (applet_private == NULL) {
return;
@@ -327,8 +327,8 @@ static VCardApplet *
cac_new_pki_applet(int i, const unsigned char *cert,
int cert_len, VCardKey *key)
{
- VCardAppletPrivate *applet_private = NULL;
- VCardApplet *applet = NULL;
+ VCardAppletPrivate *applet_private;
+ VCardApplet *applet;
unsigned char pki_aid[] = { 0xa0, 0x00, 0x00, 0x00, 0x79, 0x01, 0x00 };
int pki_aid_len = sizeof(pki_aid);