Patchwork [v3,03/28] ccid: make backend_enum_table "static const" and adjust users

login
register
mail settings
Submitter Alon Levy
Date April 22, 2013, 3:04 p.m.
Message ID <1366643098-2566-4-git-send-email-alevy@redhat.com>
Download mbox | patch
Permalink /patch/238601/
State New
Headers show

Comments

Alon Levy - April 22, 2013, 3:04 p.m.
From: Jim Meyering <meyering@redhat.com>

Signed-off-by: Jim Meyering <meyering@redhat.com>
---
 hw/usb/ccid-card-emulated.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c
index 6cbb176..094284d 100644
--- a/hw/usb/ccid-card-emulated.c
+++ b/hw/usb/ccid-card-emulated.c
@@ -462,14 +462,14 @@  typedef struct EnumTable {
     uint32_t value;
 } EnumTable;
 
-EnumTable backend_enum_table[] = {
+static const EnumTable backend_enum_table[] = {
     {BACKEND_NSS_EMULATED_NAME, BACKEND_NSS_EMULATED},
     {BACKEND_CERTIFICATES_NAME, BACKEND_CERTIFICATES},
     {NULL, 0},
 };
 
 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;
 
@@ -490,7 +490,7 @@  static int emulated_initfn(CCIDCardState *base)
 {
     EmulatedState *card = DO_UPCAST(EmulatedState, base, base);
     VCardEmulError ret;
-    EnumTable *ptable;
+    const EnumTable *ptable;
 
     QSIMPLEQ_INIT(&card->event_list);
     QSIMPLEQ_INIT(&card->guest_apdu_list);