More linting in src/scsi
This commit is contained in:
@@ -1463,11 +1463,11 @@ esp_bios_disable(esp_t *dev)
|
||||
static void
|
||||
dc390_save_eeprom(esp_t *dev)
|
||||
{
|
||||
FILE *f = nvr_fopen(dev->nvr_path, "wb");
|
||||
if (!f)
|
||||
FILE *fp = nvr_fopen(dev->nvr_path, "wb");
|
||||
if (!fp)
|
||||
return;
|
||||
fwrite(dev->eeprom.data, 1, 128, f);
|
||||
fclose(f);
|
||||
fwrite(dev->eeprom.data, 1, 128, fp);
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1599,16 +1599,16 @@ dc390_load_eeprom(esp_t *dev)
|
||||
uint8_t *nvr = (uint8_t *) eeprom->data;
|
||||
int i;
|
||||
uint16_t checksum = 0;
|
||||
FILE *f;
|
||||
FILE *fp;
|
||||
|
||||
eeprom->out = 1;
|
||||
|
||||
f = nvr_fopen(dev->nvr_path, "rb");
|
||||
if (f) {
|
||||
fp = nvr_fopen(dev->nvr_path, "rb");
|
||||
if (fp) {
|
||||
esp_log("EEPROM Load\n");
|
||||
if (fread(nvr, 1, 128, f) != 128)
|
||||
if (fread(nvr, 1, 128, fp) != 128)
|
||||
fatal("dc390_eeprom_load(): Error reading data\n");
|
||||
fclose(f);
|
||||
fclose(fp);
|
||||
} else {
|
||||
for (i = 0; i < 16; i++) {
|
||||
nvr[i * 2] = 0x57;
|
||||
@@ -1656,7 +1656,6 @@ esp_pci_read(UNUSED(int func), int addr, void *priv)
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0x01:
|
||||
return 0x10;
|
||||
case 0x02:
|
||||
|
||||
Reference in New Issue
Block a user