Check the return values of a few functions to avoid the corresponding warnings.

patch by Patrik Kullman, patrik yes nu

Originally committed as revision 17501 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Patrik Kullman 16 years ago committed by Diego Biurrun
parent 154d432cc4
commit 7e10145976
  1. 11
      vhook/ppm.c

@ -56,8 +56,11 @@ static rwpipe *rwpipe_open( int argc, char *argv[] )
int input[ 2 ]; int input[ 2 ];
int output[ 2 ]; int output[ 2 ];
pipe( input ); if (!pipe( input ))
pipe( output ); return NULL;
if (!pipe( output ))
return NULL;
this->pid = fork(); this->pid = fork();
@ -160,7 +163,9 @@ static int rwpipe_read_ppm_header( rwpipe *rw, int *width, int *height )
FILE *in = rwpipe_reader( rw ); FILE *in = rwpipe_reader( rw );
int max; int max;
fgets( line, 3, in ); if (!fgets( line, 3, in ))
return -1;
if ( !strncmp( line, "P6", 2 ) ) if ( !strncmp( line, "P6", 2 ) )
{ {
*width = rwpipe_read_number( rw ); *width = rwpipe_read_number( rw );

Loading…
Cancel
Save