1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

clang: ensure new_len is at least 1

This commit is contained in:
Zdenek Kabelac 2021-09-20 10:17:50 +02:00
parent 0d9f3dbd95
commit 834f17bb33

View File

@ -125,7 +125,9 @@ static void _print_path_delta(FILE *stream,
fprintf(stream, "\n");
}
len = common_prefix * 2 + (new[new_len - 1].e - new[new_len - 1].b);
if (new_len > 0)
len = common_prefix * 2 + (new[new_len - 1].e - new[new_len - 1].b);
fprintf(stream, " ");
for (d = len; d < 60; d++)
fprintf(stream, ".");