[iksemel, libdingaling] scan-build: fix multiple dead assignments and dereference of null pointer

This commit is contained in:
Andrey Volk committed 2020-02-22 01:48:43 +04:00
1 parent 14913244a3
commit 5e5fd214b5
7 files changed
+6 -13

No files matched your search

+1 -1
View File
@@ -32,7 +32,7 @@ static ikschunk *
find_space (ikstack *s, ikschunk *c, size_t size)
{
/* FIXME: dont use *2 after over allocated chunks */
while (1) {
while (c) {
if (c->size - c->used >= size) return c;
if (!c->next) {
if ((c->size * 2) > size) size = c->size * 2;