mirror of
https://github.com/rcornwell/sims.git
synced 2026-01-13 15:27:04 +00:00
ICL1900: Fixed coverity errors.
This commit is contained in:
parent
290ab85376
commit
fab49af8eb
@ -2529,8 +2529,8 @@ cpu_show_size(FILE *st, UNIT *uptr, int32 val, CONST void *desc)
|
||||
t_stat
|
||||
cpu_set_size(UNIT * uptr, int32 val, CONST char *cptr, void *desc)
|
||||
{
|
||||
t_uint64 mc = 0;
|
||||
uint32 i;
|
||||
uint32 mc = 0;
|
||||
uint32 i;
|
||||
|
||||
cpu_unit[0].flags &= ~UNIT_MSIZE;
|
||||
cpu_unit[0].flags |= val;
|
||||
|
||||
@ -230,6 +230,7 @@ sim_load(FILE * fileref, CONST char *cptr, CONST char *fnam, int flag)
|
||||
int addr, data;
|
||||
uint8 image[80];
|
||||
int checksum;
|
||||
char ch;
|
||||
|
||||
if (match_ext(fnam, "wush")) {
|
||||
while (fgets(buffer, 100, fileref)) {
|
||||
@ -283,13 +284,14 @@ sim_load(FILE * fileref, CONST char *cptr, CONST char *fnam, int flag)
|
||||
if (buffer[j] == '\n')
|
||||
break;
|
||||
if ((buffer[j] & 0377) == 0243)
|
||||
image[j] = 024;
|
||||
ch = 024;
|
||||
else
|
||||
image[j] = ascii_to_mem[buffer[j] & 0177];
|
||||
if (image[j] < 0) {
|
||||
ch = ascii_to_mem[buffer[j] & 0177];
|
||||
if (ch < 0) {
|
||||
fprintf(stderr, "Char %c: %s\n", buffer[j], buffer);
|
||||
return SCPE_FMT;
|
||||
}
|
||||
image[j] = ch;
|
||||
}
|
||||
for (j = 0; j < 64; ) {
|
||||
data = 0;
|
||||
@ -310,13 +312,14 @@ sim_load(FILE * fileref, CONST char *cptr, CONST char *fnam, int flag)
|
||||
if (buffer[j] == '\n')
|
||||
break;
|
||||
if ((buffer[j] & 0377) == 0243)
|
||||
image[j] = 024;
|
||||
ch = 024;
|
||||
else
|
||||
image[j] = ascii_to_mem[buffer[j] & 0177];
|
||||
if (image[j] < 0) {
|
||||
ch = ascii_to_mem[buffer[j] & 0177];
|
||||
if (ch < 0) {
|
||||
fprintf(stderr, "Char %c: %s", buffer[j], buffer);
|
||||
return SCPE_FMT;
|
||||
}
|
||||
image[j] = ch;
|
||||
}
|
||||
if (image[0] != 073) {
|
||||
fprintf(stderr, "F: %s", buffer);
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
|
||||
#define PP_V_MODE (UNIT_V_UF + 0)
|
||||
#define PP_M_MODE (3 << PP_V_MODE)
|
||||
#define PP_MODE(x) ((PP_V_MODE & (x)) >> PP_V_MODE)
|
||||
#define PP_MODE(x) ((PP_M_MODE & (x)) >> PP_V_MODE)
|
||||
#define UNIT_V_TYPE (UNIT_V_UF + 2)
|
||||
#define UNIT_TYPE (0xf << UNIT_V_TYPE)
|
||||
#define GET_TYPE(x) ((UNIT_TYPE & (x)) >> UNIT_V_TYPE)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user