checkpolicy: remove dead assignments

The variable `cladatum` is otherwise always assigned before used, so
these two assignments without a follow up usages are not needed.

Found by clang-analyzer.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
This commit is contained in:
Christian Göttsche 2021-07-06 19:54:27 +02:00 committed by Nicolas Iooss
parent 79e7724930
commit 7723180fa0
No known key found for this signature in database
GPG Key ID: C191415F340DAAA0

View File

@ -1179,8 +1179,6 @@ int main(int argc, char **argv)
printf("\nNo such class.\n"); printf("\nNo such class.\n");
break; break;
} }
cladatum =
policydb.class_val_to_struct[tclass - 1];
} else { } else {
ans[strlen(ans) - 1] = 0; ans[strlen(ans) - 1] = 0;
cladatum = cladatum =
@ -1232,8 +1230,6 @@ int main(int argc, char **argv)
printf("\nNo such class.\n"); printf("\nNo such class.\n");
break; break;
} }
cladatum =
policydb.class_val_to_struct[tclass - 1];
} else { } else {
ans[strlen(ans) - 1] = 0; ans[strlen(ans) - 1] = 0;
cladatum = cladatum =