Merge pull request #4678 from shattered/_02409f23fe

coverity: a few low hanging fruit (nw)
This commit is contained in:
R. Belmont 2019-03-31 16:51:50 -04:00 committed by GitHub
commit 30747be5a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 4 additions and 18 deletions

View File

@ -162,9 +162,7 @@ void device_macpds_card_interface::install_bank(offs_t start, offs_t end, const
char bank[256]; char bank[256];
// append an underscore and the slot name to the bank so it's guaranteed unique // append an underscore and the slot name to the bank so it's guaranteed unique
strcpy(bank, tag); snprintf(bank, sizeof(bank), "%s_%s", tag, m_macpds_slottag);
strcat(bank, "_");
strcat(bank, m_macpds_slottag);
m_macpds->install_bank(start, end, bank, data); m_macpds->install_bank(start, end, bank, data);
} }

View File

@ -300,9 +300,7 @@ void device_nubus_card_interface::install_bank(offs_t start, offs_t end, const c
char bank[256]; char bank[256];
// append an underscore and the slot name to the bank so it's guaranteed unique // append an underscore and the slot name to the bank so it's guaranteed unique
strcpy(bank, tag); snprintf(bank, sizeof(bank), "%s_%s", tag, m_nubus_slottag);
strcat(bank, "_");
strcat(bank, m_nubus_slottag);
nubus().install_bank(start, end, bank, data); nubus().install_bank(start, end, bank, data);
} }
@ -444,8 +442,7 @@ void device_nubus_card_interface::install_declaration_rom(device_t *dev, const c
// now install the ROM // now install the ROM
uint32_t addr = get_slotspace() + 0x01000000; uint32_t addr = get_slotspace() + 0x01000000;
char bankname[128]; char bankname[128];
strcpy(bankname, "rom_"); snprintf(bankname, sizeof(bankname), "rom_%s", m_nubus_slottag);
strcat(bankname, m_nubus_slottag);
addr -= romlen; addr -= romlen;
// printf("Installing ROM at %x, length %x\n", addr, romlen); // printf("Installing ROM at %x, length %x\n", addr, romlen);
if (mirror_all_mb) // mirror the declaration ROM across all 16 megs of the slot space if (mirror_all_mb) // mirror the declaration ROM across all 16 megs of the slot space

View File

@ -188,7 +188,6 @@ uint32_t att4425_state::screen_update(screen_device &screen, bitmap_ind16 &bitma
*p++ = bg; *p++ = bg;
} }
} }
ma += 160;
} }
return 0; return 0;
} }

View File

@ -132,14 +132,6 @@ READ8_MEMBER(bob85_state::bob85_keyboard_r)
else else
return 0; return 0;
} }
if (retVal == 0)
{
m_prev_key = 0;
m_count_key = 0;
}
return retVal;
} }
WRITE8_MEMBER(bob85_state::bob85_7seg_w) WRITE8_MEMBER(bob85_state::bob85_7seg_w)

View File

@ -1469,7 +1469,7 @@ WRITE8_MEMBER( apollo_graphics_15i::apollo_ccr_w )
case 0x401: case 0x401:
// LUT data register // LUT data register
m_lut_data = data; m_lut_data = data;
if ((m_lut_control & LUT_R_W) == 1) if ((m_lut_control & LUT_R_W) == LUT_R_W)
{ {
MLOG1(("apollo_graphics_15i::apollo_ccr_w: writing LUT data register with RW = 1 in LUT Control register")); MLOG1(("apollo_graphics_15i::apollo_ccr_w: writing LUT data register with RW = 1 in LUT Control register"));
} }