mirror of https://gitee.com/openkylin/qemu.git
ccid: make backend_enum_table "static const" and adjust users
Signed-off-by: Jim Meyering <meyering@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com> Reviewed-by: Marc-André Lureau <mlureau@redhat.com>
This commit is contained in:
parent
d0ebd78890
commit
d18c711746
|
@ -462,14 +462,14 @@ typedef struct EnumTable {
|
||||||
uint32_t value;
|
uint32_t value;
|
||||||
} EnumTable;
|
} EnumTable;
|
||||||
|
|
||||||
EnumTable backend_enum_table[] = {
|
static const EnumTable backend_enum_table[] = {
|
||||||
{BACKEND_NSS_EMULATED_NAME, BACKEND_NSS_EMULATED},
|
{BACKEND_NSS_EMULATED_NAME, BACKEND_NSS_EMULATED},
|
||||||
{BACKEND_CERTIFICATES_NAME, BACKEND_CERTIFICATES},
|
{BACKEND_CERTIFICATES_NAME, BACKEND_CERTIFICATES},
|
||||||
{NULL, 0},
|
{NULL, 0},
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint32_t parse_enumeration(char *str,
|
static uint32_t parse_enumeration(char *str,
|
||||||
EnumTable *table, uint32_t not_found_value)
|
const EnumTable *table, uint32_t not_found_value)
|
||||||
{
|
{
|
||||||
uint32_t ret = not_found_value;
|
uint32_t ret = not_found_value;
|
||||||
|
|
||||||
|
@ -490,7 +490,7 @@ static int emulated_initfn(CCIDCardState *base)
|
||||||
{
|
{
|
||||||
EmulatedState *card = DO_UPCAST(EmulatedState, base, base);
|
EmulatedState *card = DO_UPCAST(EmulatedState, base, base);
|
||||||
VCardEmulError ret;
|
VCardEmulError ret;
|
||||||
EnumTable *ptable;
|
const EnumTable *ptable;
|
||||||
|
|
||||||
QSIMPLEQ_INIT(&card->event_list);
|
QSIMPLEQ_INIT(&card->event_list);
|
||||||
QSIMPLEQ_INIT(&card->guest_apdu_list);
|
QSIMPLEQ_INIT(&card->guest_apdu_list);
|
||||||
|
|
Loading…
Reference in New Issue