apparmor: Redundant condition: prev_ns. in [label.c:1498]
authorJohn Johansen <john.johansen@canonical.com>
Tue, 1 Aug 2017 06:44:37 +0000 (23:44 -0700)
committerJohn Johansen <john.johansen@canonical.com>
Fri, 22 Sep 2017 20:00:57 +0000 (13:00 -0700)
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/label.c

index e052eaba1cf6ccb003c1e3ae364798bc44b1d292..e324f4df3e34ead7183553bb398c33619d6812a6 100644 (file)
@@ -1495,7 +1495,7 @@ static int aa_profile_snxprint(char *str, size_t size, struct aa_ns *view,
                view = profiles_ns(profile);
 
        if (view != profile->ns &&
-           (!prev_ns || (prev_ns && *prev_ns != profile->ns))) {
+           (!prev_ns || (*prev_ns != profile->ns))) {
                if (prev_ns)
                        *prev_ns = profile->ns;
                ns_name = aa_ns_name(view, profile->ns,