From: Thibault Godouet Date: Sat, 6 Mar 2010 10:37:58 +0000 (+0000) Subject: Fixed warning on freopen() return value not checked X-Git-Tag: ver3_0_5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f724b47ba719bcbc896fed42723734d5cc87a88d;p=thirdparty%2Ffcron.git Fixed warning on freopen() return value not checked --- diff --git a/job.c b/job.c index 0edc4bd..b748b49 100644 --- a/job.c +++ b/job.c @@ -376,8 +376,10 @@ run_job_grand_child_setup_stderr_stdout(cl_t *line, int *pipe_fd) #endif } else if ( foreground ) { - freopen("/dev/null", "w", stdout); - freopen("/dev/null", "w", stderr); + if ( freopen("/dev/null", "w", stdout) == NULL ) + error_e("could not freopen /dev/null as stdout"); + if ( freopen("/dev/null", "w", stderr) == NULL ) + error_e("could not freopen /dev/null as stderr"); } }