inline is something the compiler can decide on his own.

static is a good hint to the compiler for that - the function isn't used
outside of this file. 
"static inline" is not valid, visual studio doesn't compile that.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3209 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
aj 2007-07-09 14:17:43 +00:00
parent ae627ca3ac
commit d7bde1e9e0
3 changed files with 7 additions and 14 deletions

View File

@ -83,16 +83,14 @@ static int do_cardos_extract_pubkey(sc_card_t *card, int nr, u8 tag,
#define CARDOS_ALGO_EXT_RSA_SIG_PURE 0x8a
#define CARDOS_ALGO_PIN 0x87
static inline void
tlv_init(struct tlv *tlv, u8 *base, size_t size)
static void tlv_init(struct tlv *tlv, u8 *base, size_t size)
{
tlv->base = base;
tlv->end = base + size;
tlv->current = tlv->next = base;
}
static inline void
tlv_next(struct tlv *tlv, u8 tag)
static void tlv_next(struct tlv *tlv, u8 tag)
{
assert(tlv->next + 2 < tlv->end);
tlv->current = tlv->next;
@ -100,8 +98,7 @@ tlv_next(struct tlv *tlv, u8 tag)
*(tlv->next++) = 0;
}
static inline void
tlv_add(struct tlv *tlv, u8 val)
static void tlv_add(struct tlv *tlv, u8 val)
{
assert(tlv->next + 1 < tlv->end);
*(tlv->next++) = val;

View File

@ -492,8 +492,7 @@ cflex_delete_dummy_chvs(sc_profile_t *profile, sc_card_t *card,
/*
* Create a pin file
*/
static inline void
put_pin(sc_profile_t *profile, unsigned char *buf,
static void put_pin(sc_profile_t *profile, unsigned char *buf,
const u8 *pin, size_t len, int retry)
{
if (len > 8)

View File

@ -87,16 +87,14 @@ static int incrypto34_extract_pubkey(sc_card_t *, int,
#define INCRYPTO34_DECIPHER_RSA INCRYPTO34_ALGO_RSA_PURE
#define INCRYPTO34_ALGO_PIN 0x87
static inline void
tlv_init(struct tlv *tlv, u8 *base, size_t size)
static void tlv_init(struct tlv *tlv, u8 *base, size_t size)
{
tlv->base = base;
tlv->end = base + size;
tlv->current = tlv->next = base;
}
static inline void
tlv_next(struct tlv *tlv, u8 tag)
static void tlv_next(struct tlv *tlv, u8 tag)
{
assert(tlv->next + 2 < tlv->end);
tlv->current = tlv->next;
@ -104,8 +102,7 @@ tlv_next(struct tlv *tlv, u8 tag)
*(tlv->next++) = 0;
}
static inline void
tlv_add(struct tlv *tlv, u8 val)
static void tlv_add(struct tlv *tlv, u8 val)
{
assert(tlv->next + 1 < tlv->end);
*(tlv->next++) = val;