From 7a210cb6a4653fdcefebefafbef3dc1b339d7a76 Mon Sep 17 00:00:00 2001 From: imp Date: Sun, 26 Oct 2003 00:51:40 +0000 Subject: [PATCH] Const poison string accessor functions. --- sys/dev/ncv/ncr53c500_pccard.c | 4 ++-- sys/dev/pccard/pccard.c | 7 ++++--- sys/dev/pccard/pccardvar.h | 8 ++++---- sys/dev/xe/if_xe_pccard.c | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/sys/dev/ncv/ncr53c500_pccard.c b/sys/dev/ncv/ncr53c500_pccard.c index bd172aa9c55f..ec4129ee706a 100644 --- a/sys/dev/ncv/ncr53c500_pccard.c +++ b/sys/dev/ncv/ncr53c500_pccard.c @@ -206,8 +206,8 @@ ncv_alloc_resource(DEVPORT_PDEVICE dev) static int ncv_pccard_match(device_t dev) { const struct ncv_product *pp; - char *vendorstr; - char *prodstr; + const char *vendorstr; + const char *prodstr; if ((pp = (const struct ncv_product *) pccard_product_lookup(dev, (const struct pccard_product *) ncv_products, diff --git a/sys/dev/pccard/pccard.c b/sys/dev/pccard/pccard.c index 7c54b6fae9fc..4194275d8d19 100644 --- a/sys/dev/pccard/pccard.c +++ b/sys/dev/pccard/pccard.c @@ -151,7 +151,8 @@ pccard_ccr_write(struct pccard_function *pf, int ccr, int val) static int pccard_set_default_descr(device_t dev) { - char *vendorstr, *prodstr, *str; + const char *vendorstr, *prodstr; + char *str; if (pccard_get_vendor_str(dev, &vendorstr)) return (0); @@ -324,8 +325,8 @@ pccard_do_product_lookup(device_t bus, device_t dev, u_int32_t fcn; u_int32_t vendor; u_int32_t prod; - char *vendorstr; - char *prodstr; + const char *vendorstr; + const char *prodstr; #ifdef DIAGNOSTIC if (sizeof *ent > ent_size) diff --git a/sys/dev/pccard/pccardvar.h b/sys/dev/pccard/pccardvar.h index 0289a3fb04bc..7a20f48b4dcb 100644 --- a/sys/dev/pccard/pccardvar.h +++ b/sys/dev/pccard/pccardvar.h @@ -349,10 +349,10 @@ PCCARD_ACCESSOR(product, PRODUCT, uint32_t) PCCARD_ACCESSOR(prodext, PRODEXT, uint16_t) PCCARD_ACCESSOR(function_number,FUNCTION_NUMBER, uint32_t) PCCARD_ACCESSOR(function, FUNCTION, uint32_t) -PCCARD_ACCESSOR(vendor_str, VENDOR_STR, char *) -PCCARD_ACCESSOR(product_str, PRODUCT_STR, char *) -PCCARD_ACCESSOR(cis3_str, CIS3_STR, char *) -PCCARD_ACCESSOR(cis4_str, CIS4_STR, char *) +PCCARD_ACCESSOR(vendor_str, VENDOR_STR, const char *) +PCCARD_ACCESSOR(product_str, PRODUCT_STR, const char *) +PCCARD_ACCESSOR(cis3_str, CIS3_STR, const char *) +PCCARD_ACCESSOR(cis4_str, CIS4_STR, const char *) /* shared memory flags */ enum { diff --git a/sys/dev/xe/if_xe_pccard.c b/sys/dev/xe/if_xe_pccard.c index 3e342bf515b5..e2b7541d0029 100644 --- a/sys/dev/xe/if_xe_pccard.c +++ b/sys/dev/xe/if_xe_pccard.c @@ -218,7 +218,7 @@ xe_pccard_probe(device_t dev) struct xe_softc *scp = (struct xe_softc *) device_get_softc(dev); u_int32_t vendor,prodid,prod; u_int16_t prodext; - char *cis3_str=NULL; + const char *cis3_str=NULL; struct xe_vendor_table *vendor_itm; struct xe_card_type_table *card_itm; int i;