[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
@@ -36,7 +36,7 @@ test_stack (int cs)
memset (mem, 'x', i);
old = iks_stack_strcat (s, old, 0, buf + i, 1);
}
if (strcmp (old, buf) != 0) {
if (old && strcmp (old, buf) != 0) {
printf ("ikstack strcat bug:\nExpected: %s\n Result: %s\n", buf, old);
exit (1);
}