mirror of
https://github.com/SELinuxProject/selinux
synced 2025-01-19 03:40:50 +00:00
checkpolicy: simplify assignment
checkpolicy.c:504:20: style: The statement 'if (policyvers!=n) policyvers=n' is logically equivalent to 'policyvers=n'. [duplicateConditionalAssign] if (policyvers != n) ^ checkpolicy.c:505:17: note: Assignment 'policyvers=n' policyvers = n; ^ checkpolicy.c:504:20: note: Condition 'policyvers!=n' is redundant if (policyvers != n) ^ Found by Cppcheck Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
This commit is contained in:
parent
02678b9d40
commit
7cdb2a8fd2
@ -504,8 +504,7 @@ int main(int argc, char **argv)
|
|||||||
usage(argv[0]);
|
usage(argv[0]);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
if (policyvers != n)
|
policyvers = n;
|
||||||
policyvers = n;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'E':
|
case 'E':
|
||||||
|
Loading…
Reference in New Issue
Block a user