more small coverity fixes
This commit is contained in:
parent
d3351c77a3
commit
864dfbf7aa
@ -467,7 +467,9 @@ fetch_nonwhite( FILE *fp, const char whitemap[256], char *buf, int max )
|
||||
for( i = 0; i < max - 1; i++ ) {
|
||||
ch = vips__fgetc( fp );
|
||||
|
||||
if( ch == EOF || ch == '\n' || whitemap[ch] )
|
||||
if( ch == EOF ||
|
||||
ch == '\n' ||
|
||||
whitemap[ch] )
|
||||
break;
|
||||
|
||||
buf[i] = ch;
|
||||
|
@ -966,7 +966,7 @@ rad2vips_process_line( char *line, Read *read )
|
||||
COLOR cc;
|
||||
int i;
|
||||
|
||||
colcorval( cc, line );
|
||||
(void) colcorval( cc, line );
|
||||
for( i = 0; i < 3; i++ )
|
||||
read->colcor[i] *= cc[i];
|
||||
}
|
||||
|
@ -152,9 +152,13 @@ read_new( const char *filename, void *data, size_t length )
|
||||
* mmap the input file, it's slightly quicker.
|
||||
*/
|
||||
if( (read->fd = vips__open_image_read( read->filename )) < 0 ||
|
||||
(read->length = vips_file_length( read->fd )) < 0 ||
|
||||
!(read->data = vips__mmap( read->fd,
|
||||
FALSE, read->length, 0 )) ) {
|
||||
(read->length = vips_file_length( read->fd )) < 0 ) {
|
||||
read_free( read );
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
if( !(read->data =
|
||||
vips__mmap( read->fd, FALSE, read->length, 0 )) ) {
|
||||
read_free( read );
|
||||
return( NULL );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user