Changeset 656 for trunk/src/ifd/apdu.c


Ignore:
Timestamp:
05/29/05 11:36:03 (7 years ago)
Author:
aj
Message:

Lindent for consistent style

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ifd/apdu.c

    r354 r656  
    1111 * Check the APDU type and length 
    1212 */ 
    13 static int 
    14 __ifd_apdu_check(const void *sbuf, size_t len, ifd_iso_apdu_t *iso) 
     13static int __ifd_apdu_check(const void *sbuf, size_t len, ifd_iso_apdu_t * iso) 
    1514{ 
    16         unsigned char   *data = (unsigned char *) sbuf; 
    17         unsigned int    b; 
     15        unsigned char *data = (unsigned char *)sbuf; 
     16        unsigned int b; 
    1817 
    1918        memset(iso, 0, sizeof(*iso)); 
     
    2928        if (len == 0) { 
    3029                iso->cse = IFD_APDU_CASE_2S; 
    31                 iso->le = b? b : 256; 
     30                iso->le = b ? b : 256; 
    3231                return 0; 
    3332        } 
     
    5049        if (len == b + 1) { 
    5150                iso->cse = IFD_APDU_CASE_4S; 
    52                 iso->le = data[b]? data[b] : 256; 
     51                iso->le = data[b] ? data[b] : 256; 
    5352                iso->len--; 
    5453                return 0; 
     
    5857} 
    5958 
    60 int 
    61 ifd_apdu_case(const void *buf, size_t len) 
     59int ifd_apdu_case(const void *buf, size_t len) 
    6260{ 
    6361        ifd_iso_apdu_t iso; 
     
    7169 * Convert internal APDU type to an ISO-7816-4 APDU 
    7270 */ 
    73 int 
    74 ifd_iso_apdu_parse(const void *data, size_t len, ifd_iso_apdu_t *iso) 
     71int ifd_iso_apdu_parse(const void *data, size_t len, ifd_iso_apdu_t * iso) 
    7572{ 
    76         unsigned char   *p; 
     73        unsigned char *p; 
    7774 
    7875        if (len < 4) 
     
    8279                return -1; 
    8380 
    84         p = (unsigned char *) data; 
     81        p = (unsigned char *)data; 
    8582        iso->cla = *p++; 
    8683        iso->ins = *p++; 
    87         iso->p1  = *p++; 
    88         iso->p2  = *p++; 
     84        iso->p1 = *p++; 
     85        iso->p2 = *p++; 
    8986 
    9087        return 0; 
Note: See TracChangeset for help on using the changeset viewer.