static analyzer bits for restore.c
src/restore.c(275): warning: Dereferencing NULL pointer. 'otmp' contains the
same NULL value as 'first' did.
src/restore.c(402): warning: Dereferencing NULL pointer. 'mtmp' contains the
same NULL value as 'first' did.
This commit is contained in:
@@ -250,6 +250,7 @@ restobjchn(NHFILE *nhfp, boolean frozen)
|
||||
break;
|
||||
|
||||
otmp = newobj();
|
||||
assert(otmp != 0);
|
||||
restobj(nhfp, otmp);
|
||||
if (!first)
|
||||
first = otmp;
|
||||
@@ -387,6 +388,7 @@ restmonchn(NHFILE *nhfp)
|
||||
break;
|
||||
|
||||
mtmp = newmonst();
|
||||
assert(mtmp != 0);
|
||||
restmon(nhfp, mtmp);
|
||||
if (!first)
|
||||
first = mtmp;
|
||||
|
||||
Reference in New Issue
Block a user