SCP: Minor Coverity cleanup
This commit is contained in:
parent
0c7bf366ae
commit
ff4c7b154e
1 changed files with 20 additions and 18 deletions
6
scp.c
6
scp.c
|
@ -2908,7 +2908,8 @@ if (SCPE_BARE_STATUS(stat) == SCPE_OPENERR)
|
|||
stat = docmdp->action (-1, "simh.ini"); /* simh.ini proc cmd file */
|
||||
if (*cbuf) /* cmd file arg? */
|
||||
stat = docmdp->action (0, cbuf); /* proc cmd file */
|
||||
else if (*argv[0]) { /* sim name arg? */
|
||||
else {
|
||||
if (*argv[0]) { /* sim name arg? */
|
||||
char *np; /* "path.ini" */
|
||||
nbuf[0] = '"'; /* starting " */
|
||||
strlcpy (nbuf + 1, argv[0], PATH_MAX + 2); /* copy sim name */
|
||||
|
@ -2928,6 +2929,7 @@ else if (*argv[0]) { /* sim name arg? */
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (SCPE_BARE_STATUS(stat) == SCPE_OPENERR) /* didn't exist/can't open? */
|
||||
stat = SCPE_OK;
|
||||
|
||||
|
@ -3182,7 +3184,7 @@ if ((strlen (buf) >= max_width) &&
|
|||
size_t front_gap_size = front_gap - buf + 1;
|
||||
|
||||
line_pos = 0;
|
||||
end = buf + (buf ? strlen (buf) : 0);
|
||||
end = buf + strlen (buf);
|
||||
while (1) {
|
||||
chunk_size = (end - buf);
|
||||
if (line_pos + chunk_size >= max_width)
|
||||
|
|
Loading…
Add table
Reference in a new issue