Const poison string accessor functions.

This commit is contained in:
Warner Losh 2003-10-26 00:51:40 +00:00
parent 2998b879f0
commit 595670d932
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=121521
4 changed files with 11 additions and 10 deletions

View File

@ -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,

View File

@ -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)

View File

@ -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 {

View File

@ -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;