symbols: remove unneeded optimization The levels will be resized to the number of levels of the type anyway, so removing useless levels from the end here is unneeded. Signed-off-by: Ran Benita <ran234@gmail.com>
diff --git a/src/xkbcomp/symbols.c b/src/xkbcomp/symbols.c
index 7ef5722..09d577e 100644
--- a/src/xkbcomp/symbols.c
+++ b/src/xkbcomp/symbols.c
@@ -808,10 +808,6 @@ AddSymbolsToKey(SymbolsInfo *info, KeyInfo *keyi, ExprDef *arrayNdx,
}
}
- for (j = darray_size(groupi->levels) - 1;
- j >= 0 && darray_item(groupi->levels, j).num_syms == 0; j--)
- (void) darray_pop(groupi->levels);
-
return true;
}