summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2010-10-18 13:13:49 +0200
committerAlon Levy <alevy@redhat.com>2010-10-18 13:13:49 +0200
commit364a129a437048f2faa21e0766cdec3ab46153b4 (patch)
treec66cc6f45a22ef694b29da8bebc30a8cb0ef6200
parentd7d4b4af7787f4166f747bbd0be37f668eb61d2e (diff)
whitespace cleanup, typo
-rw-r--r--passthru.c30
-rw-r--r--passthru.h2
2 files changed, 16 insertions, 16 deletions
diff --git a/passthru.c b/passthru.c
index 6f9b7c8..1a45d4a 100644
--- a/passthru.c
+++ b/passthru.c
@@ -47,7 +47,7 @@ passthru_process_apdu(VCard *card, VCardAPDU *apdu, VCardResponse **response)
return VCARD_DONE;
}
- rv = SCardTransmit(applet_private->hCard,applet_private->send_io,
+ rv = SCardTransmit(applet_private->hCard, applet_private->send_io,
apdu->a_data, apdu->a_len, &receive_io, buf, &len);
if (rv != SCARD_S_SUCCESS) {
*response = vcard_make_response(VCARD7816_STATUS_EXC_ERROR);
@@ -167,7 +167,7 @@ passthru_get_reader_name(VReader *reader)
}
/* match that name */
- for (reader_entry= reader_list;*reader_entry;
+ for (reader_entry= reader_list;*reader_entry;
reader_entry += strlen(reader_entry)+1) {
if (string_match(reader_entry, reader_name)) {
reader_match = strdup(reader_entry);
@@ -262,7 +262,7 @@ passthru_new_applet(VReader *reader)
if (applet == NULL) {
goto failure;
}
- vcard_set_applet_private(applet, applet_private,
+ vcard_set_applet_private(applet, applet_private,
passthru_delete_applet_private);
applet_private = NULL;
@@ -354,9 +354,9 @@ passthru_get_blank_reader(SCARD_READERSTATE_A *reader_states, int reader_count)
return passthru_get_reader_state(reader_states, reader_count, NULL);
}
-
+
/*
- * This is the main work of the emulator, handling the thread that looks for changes in the
+ * This is the main work of the emulator, handling the thread that looks for changes in the
* readers and the cards.
*/
static void *
@@ -388,7 +388,7 @@ passthru_emul_event_thread(void *args)
if (rv != SCARD_S_SUCCESS) {
goto next;
}
- /*
+ /*
* If the names have changed, we need to update our list and states.
* This is where we detect reader insertions and removals.
*/
@@ -408,12 +408,12 @@ passthru_emul_event_thread(void *args)
reader_states[i].dwEventState = 0;
}
/* count the readers and mark the ones that are still with us */
- for (reader_entry = new_reader_list; *reader_entry;
+ for (reader_entry = new_reader_list; *reader_entry;
reader_entry += strlen(reader_entry)+1) {
SCARD_READERSTATE_A *this_state;
new_reader_count++;
/* if the reader is still on the list, mark it present */
- this_state = passthru_get_reader_state(reader_states, reader_count,
+ this_state = passthru_get_reader_state(reader_states, reader_count,
reader_entry);
if (this_state) {
this_state->dwEventState = SCARD_STATE_PRESENT;
@@ -437,7 +437,7 @@ passthru_emul_event_thread(void *args)
for (i=reader_count-1; i < (new_reader_count -1); i--) {
if (reader_states[i].szReader) {
SCARD_READERSTATE_A *blank_reader;
- blank_reader = passthru_get_blank_reader(reader_states,
+ blank_reader = passthru_get_blank_reader(reader_states,
new_reader_count);
assert(blank_reader);
*blank_reader = reader_states[i];
@@ -450,14 +450,14 @@ passthru_emul_event_thread(void *args)
SCARD_READERSTATE_A *new_reader_states;
/* grow the list */
- new_reader_states = (SCARD_READERSTATE_A *)realloc(reader_states,
+ new_reader_states = (SCARD_READERSTATE_A *)realloc(reader_states,
sizeof(SCARD_READERSTATE_A)*new_reader_count);
if (new_reader_states) {
/* successful, update our current state */
reader_states = new_reader_states;
max_reader_count = new_reader_count;
} else {
- new_reader_count = max_reader_count; /* couldn't get enough space to handle
+ new_reader_count = max_reader_count; /* couldn't get enough space to handle
* all the new readers */
}
/* mark our new entries as empty */
@@ -466,10 +466,10 @@ passthru_emul_event_thread(void *args)
}
}
/* now walk the reader list, updating the state */
- for (reader_entry = new_reader_list; *reader_entry;
+ for (reader_entry = new_reader_list; *reader_entry;
reader_entry += strlen(reader_entry)+1) {
SCARD_READERSTATE_A *this_state;
- this_state = passthru_get_reader_state(reader_states, new_reader_count,
+ this_state = passthru_get_reader_state(reader_states, new_reader_count,
reader_entry);
if (this_state) {
/* replace the old copy of the string with the new copy. This will allow us
@@ -578,7 +578,7 @@ passthru_emul_init(VCardEmulOptions *options)
if (status != VCARD_DONE) {
return status;
}
-
+
/* launch reader thread */
tstatus = THREAD_CREATE(tid, passthru_emul_event_thread, NULL);
if (!THREAD_SUCCESS(tstatus)) {
@@ -589,7 +589,7 @@ passthru_emul_init(VCardEmulOptions *options)
VCardEmulOptions *
-passthru_emul_options(const char *args)
+passthru_emul_options(const char *args)
{
return NULL;
}
diff --git a/passthru.h b/passthru.h
index b62123d..960f012 100644
--- a/passthru.h
+++ b/passthru.h
@@ -30,7 +30,7 @@
/*
* Initialize the card. This is the only 'card type emulator' portion of this
- * the rest are connected through function pointers. NOTE: certs are ignorned,
+ * the rest are connected through function pointers. NOTE: certs are ignored,
* keys are freed.
*/
VCardStatus passthru_card_init(VReader *vreader, VCard *card,