]> www.infradead.org Git - mtd-utils.git/commitdiff
fs-tests: integck: remove unnecessary check
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Mon, 28 Mar 2011 12:05:18 +0000 (15:05 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Mon, 11 Apr 2011 10:22:31 +0000 (13:22 +0300)
The 'link_new()' function has only one user, and the user checks
that the third 'file' argument is non NULL, so remove this check
from 'link_new()'. Let's be consistent and assume the 3rd argument
is never NULL, just like the first and the second ones.

This is just a minor improvement.

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

index 1801b2040a163cae3bc9e8f07905e446ce71723e..155b619ab374fa7bc28cbc2f5ea0480ad5503b2d 100644 (file)
@@ -425,8 +425,6 @@ static void link_new(struct dir_info *parent, const char *name,
        char *path, *target;
        int ret;
 
-       if (!file)
-               return;
        entry = file->links;
        if (!entry)
                return;