libselinux: context_new(): drop dead assignment

The variable `i` is not used inside this loop, and it later
unconditionally set to 0.

Found by clang-analyzer.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
This commit is contained in:
Christian Göttsche 2021-05-03 17:10:59 +02:00 committed by Petr Lautrbach
parent 319429ba33
commit 782fa6ea38

View file

@ -37,7 +37,7 @@ context_t context_new(const char *str)
}
n->current_str = n->component[0] = n->component[1] = n->component[2] =
n->component[3] = 0;
for (i = count = 0, p = str; *p; p++) {
for (count = 0, p = str; *p; p++) {
switch (*p) {
case ':':
count++;