mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-23 04:52:42 -08:00
coverity fix 1434978 Argument cannot be negative
https://scan7.coverity.com/reports.htm#v29378/p15116/fileInstanceId=19260861&defectInstanceId=4445893&mergedDefectId=1434978
This commit is contained in:
parent
a74094de9a
commit
f8432d1f5f
2 changed files with 4 additions and 2 deletions
|
|
@ -5328,7 +5328,9 @@ flisten(cl_object stream, FILE *fp)
|
|||
{
|
||||
/* regular file */
|
||||
ecl_off_t old_pos = ecl_ftello(fp), end_pos;
|
||||
unlikely_if (ecl_fseeko(fp, 0, SEEK_END) != 0)
|
||||
unlikely_if (old_pos == -1
|
||||
||
|
||||
ecl_fseeko(fp, 0, SEEK_END) != 0)
|
||||
file_libc_error(@[file-error], stream,
|
||||
"Unable to check file position", 0);
|
||||
end_pos = ecl_ftello(fp);
|
||||
|
|
|
|||
|
|
@ -533,7 +533,7 @@ si_spawn_subprocess(cl_object command, cl_object argv, cl_object environ,
|
|||
if (Null(pid)) {
|
||||
if (parent_write) close(parent_write);
|
||||
if (parent_read) close(parent_read);
|
||||
if (parent_error) close(parent_error);
|
||||
if (parent_error >= 0) close(parent_error);
|
||||
parent_write = 0;
|
||||
parent_read = 0;
|
||||
parent_error = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue