[FFmpeg-cvslog] r17501 - trunk/vhook/ppm.c
diego
subversion
Sat Feb 21 22:09:38 CET 2009
Author: diego
Date: Sat Feb 21 22:09:38 2009
New Revision: 17501
Log:
Check the return values of a few functions to avoid the corresponding warnings.
patch by Patrik Kullman, patrik yes nu
Modified:
trunk/vhook/ppm.c
Modified: trunk/vhook/ppm.c
==============================================================================
--- trunk/vhook/ppm.c Sat Feb 21 22:07:37 2009 (r17500)
+++ trunk/vhook/ppm.c Sat Feb 21 22:09:38 2009 (r17501)
@@ -56,8 +56,11 @@ static rwpipe *rwpipe_open( int argc, ch
int input[ 2 ];
int output[ 2 ];
- pipe( input );
- pipe( output );
+ if (!pipe( input ))
+ return NULL;
+
+ if (!pipe( output ))
+ return NULL;
this->pid = fork();
@@ -160,7 +163,9 @@ static int rwpipe_read_ppm_header( rwpip
FILE *in = rwpipe_reader( rw );
int max;
- fgets( line, 3, in );
+ if (!fgets( line, 3, in ))
+ return -1;
+
if ( !strncmp( line, "P6", 2 ) )
{
*width = rwpipe_read_number( rw );
More information about the ffmpeg-cvslog
mailing list