Permalink
Browse files

Fix NULL vs integer comparison mistakes

  • Loading branch information...
joncampbell123 committed Mar 20, 2018
1 parent ce8a97d commit 13f4c43ea5dd8b2482f40126a3d9545deb241607
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/dos/dos_programs.cpp
@@ -3008,7 +3008,7 @@ class IMGMOUNT : public Program {
if (!dsk->active) {
WriteOut(MSG_Get("PROGRAM_IMGMOUNT_CANT_CREATE"));
delete dsk;
return false;
return NULL;
}
dsk->Set_Reserved_Cylinders(reserved_cylinders);
return dsk;
@@ -3019,7 +3019,7 @@ class IMGMOUNT : public Program {
if (dsk == NULL) return NULL;
//formatting might fail; just log the failure and continue
Bit8u ret = dsk->Format();
if (ret != NULL) {
if (ret != 0x00) {
LOG_MSG("Warning: could not format ramdrive - error code %u\n", (unsigned int)ret);
}
return dsk;

0 comments on commit 13f4c43

Please sign in to comment.