]>
www.infradead.org Git - mtd-utils.git/commit
fs-tests: integck: prefer to check for success
Many of standard C libraries return 0 on success and -1 on failure.
Currently integck mostly checks for failure by comparing with -1, like:
CHECK(fsync(fd) != -1) /* Don't die if not failure */
but in some places the check is like
CHECK(fsync(fd) == 0) /* Don't die if success */
This patch harmonizes this an makes integck to use the second style
which seems to be more logical. Besides, the binary is smaller in
this case:
[dedekind@eru fs-tests (master)]$ size integrity/integck-old
text data bss dec hex filename
44677 1200 37408 83285 14555 integrity/integck
[dedekind@eru fs-tests (master)]$ size integrity/integck-new
text data bss dec hex filename
44661 1200 37408 83269 14545 integrity/integck
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>