Changeset e22af78 in rtems


Ignore:
Timestamp:
Nov 27, 2014, 3:30:12 PM (5 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
3b4ca3a
Parents:
8dbbea6b
git-author:
Joel Sherrill <joel.sherrill@…> (11/27/14 15:30:12)
git-committer:
Joel Sherrill <joel.sherrill@…> (11/27/14 16:06:23)
Message:

sync.c: Add asserts to document and check assumptions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libcsupport/src/sync.c

    r8dbbea6b re22af78  
    3030
    3131#include <rtems.h>
     32#include <rtems/score/assert.h>
    3233
    3334/* XXX check standards -- Linux version appears to be void */
     
    3839{
    3940  int fn = fileno(f);
     41  int rc;
    4042
    4143  /*
    42    *  We are explicitly NOT checking the return values as it does not
    43    *  matter if they succeed.  We are just making a best faith attempt
    44    *  at both and trusting that we were passed a good FILE pointer.
     44   *  We are explicitly NOT checking the return values in non-debug builds
     45   *  as it does not matter if they succeed.  We are just making a best
     46   *  faith attempt at both and trusting that we were passed a good
     47   *  FILE pointer.
    4548   */
    46   fsync(fn);
    47   fdatasync(fn);
     49  rc = fsync(fn);
     50  _Assert( rc == 0 );
     51
     52  rc = fdatasync(fn);
     53  _Assert( rc == 0 );
    4854}
    4955
Note: See TracChangeset for help on using the changeset viewer.