sonarlint vid_ati_eeprom.c
This commit is contained in:
@@ -35,7 +35,7 @@ ati_eeprom_load(ati_eeprom_t *eeprom, char *fn, int type)
|
||||
int size;
|
||||
eeprom->type = type;
|
||||
strncpy(eeprom->fn, fn, sizeof(eeprom->fn) - 1);
|
||||
fp = nvr_fopen(eeprom->fn, "rb");
|
||||
fp = nvr_fopen(eeprom->fn, "rb");
|
||||
size = eeprom->type ? 512 : 128;
|
||||
if (!fp) {
|
||||
memset(eeprom->data, 0xff, size);
|
||||
@@ -53,7 +53,7 @@ ati_eeprom_load_mach8(ati_eeprom_t *eeprom, char *fn)
|
||||
int size;
|
||||
eeprom->type = 0;
|
||||
strncpy(eeprom->fn, fn, sizeof(eeprom->fn) - 1);
|
||||
fp = nvr_fopen(eeprom->fn, "rb");
|
||||
fp = nvr_fopen(eeprom->fn, "rb");
|
||||
size = 128;
|
||||
if (!fp) { /*The ATI Graphics Ultra bios expects an immediate write to nvram if none is present at boot time otherwise
|
||||
it would hang the machine.*/
|
||||
@@ -95,7 +95,7 @@ ati_eeprom_write(ati_eeprom_t *eeprom, int ena, int clk, int dat)
|
||||
break;
|
||||
eeprom->state = EEPROM_OPCODE;
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case EEPROM_OPCODE:
|
||||
eeprom->opcode = (eeprom->opcode << 1) | (dat ? 1 : 0);
|
||||
|
||||
Reference in New Issue
Block a user