aboutsummaryrefslogtreecommitdiff
path: root/hw/tc58128.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2010-03-18 18:41:57 +0000
committerBlue Swirl <blauwirbel@gmail.com>2010-03-18 18:41:57 +0000
commit43dc2a645e00e6761a741e3d16c27c5b5a373b66 (patch)
treedaf9f3fd9fa34306ac03fbb6efc72860efc879ca /hw/tc58128.c
parent609c1daced7f444f9f6569bba72d6a56a697ac95 (diff)
downloadqemu-43dc2a645e00e6761a741e3d16c27c5b5a373b66.zip
qemu-43dc2a645e00e6761a741e3d16c27c5b5a373b66.tar.gz
qemu-43dc2a645e00e6761a741e3d16c27c5b5a373b66.tar.bz2
Replace assert(0) with abort() or cpu_abort()
When building with -DNDEBUG, assert(0) will not stop execution so it must not be used for abnormal termination. Use cpu_abort() when in CPU context, abort() otherwise. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/tc58128.c')
-rw-r--r--hw/tc58128.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/tc58128.c b/hw/tc58128.c
index 264aa02..672a01c 100644
--- a/hw/tc58128.c
+++ b/hw/tc58128.c
@@ -82,7 +82,7 @@ static void handle_command(tc58128_dev * dev, uint8_t command)
break;
default:
fprintf(stderr, "unknown flash command 0x%02x\n", command);
- assert(0);
+ abort();
}
}
@@ -110,12 +110,12 @@ static void handle_address(tc58128_dev * dev, uint8_t data)
break;
default:
/* Invalid data */
- assert(0);
+ abort();
}
dev->address_cycle++;
break;
default:
- assert(0);
+ abort();
}
}
@@ -164,7 +164,7 @@ static int tc58128_cb(uint16_t porta, uint16_t portb,
*periph_pdtra &= 0xff00;
*periph_pdtra |= handle_read(&tc58128_devs[dev]);
} else {
- assert(0);
+ abort();
}
return 1;
}