]> www.infradead.org Git - mtd-utils.git/commitdiff
fs-tests: integck: fix line number in CHECK() output
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Sun, 24 Apr 2011 07:11:03 +0000 (10:11 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Mon, 25 Apr 2011 17:04:30 +0000 (20:04 +0300)
In 'check_failed()' use the file and line number provided by the CHECK()
macro via the function parameters, rather than using __LINE__ directly.
Otherwise the funtion prints its own line, instead of the line where the
CHECK() failed.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
tests/fs-tests/integrity/integck.c

index 80d34c006fd3e3c8d0e0d6f7802c2aaa5cef91e3..9f03709703531854c25ff1f363e04101580803b4 100644 (file)
@@ -233,7 +233,7 @@ static void check_failed(const char *cond, const char *func, const char *file,
 
        fflush(stdout);
        errmsg("condition '%s' failed in %s() at %s:%d",
-              cond, func, __FILE__, __LINE__);
+              cond, func, file, line);
        normsg("error %d (%s)", error, strerror(error));
        /*
         * Note, to make this work well you need: