On 26/11/14 00:02, Joel Sherrill wrote:
From: Josh Oguin <[email protected]>CodeSonar spotted that the return values were being ignored. --- cpukit/libcsupport/src/sync.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cpukit/libcsupport/src/sync.c b/cpukit/libcsupport/src/sync.c index b8e5059..0e935ce 100644 --- a/cpukit/libcsupport/src/sync.c +++ b/cpukit/libcsupport/src/sync.c @@ -43,8 +43,10 @@ static void sync_wrapper(FILE *f) * matter if they succeed. We are just making a best faith attempt * at both and trusting that we were passed a good FILE pointer. */ - (void) fsync(fn); - (void) fdatasync(fn); + if ( fn != -1 ) { + (void) fsync(fn); + (void) fdatasync(fn); + } }/* iterate over all FILE *'s for this thread */
This test is superfluous since both functions validate the file descriptor. All other patches look good.
-- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : [email protected] PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. _______________________________________________ devel mailing list [email protected] http://lists.rtems.org/mailman/listinfo/devel
