summaryrefslogtreecommitdiff
path: root/raa.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-07-18 21:07:17 -0400
committerH. Peter Anvin <hpa@zytor.com>2009-07-18 18:43:12 -0700
commit9bd1506d5999d7c41a4cf6de2f43b97939bb260e (patch)
treed3dad5bda2b167af7dfe29cad7cb532406ddb1c4 /raa.c
parent159178f2aa516718fcb420a281c17adc8b330492 (diff)
downloadnasm-9bd1506d5999d7c41a4cf6de2f43b97939bb260e.tar.gz
nasm-9bd1506d5999d7c41a4cf6de2f43b97939bb260e.tar.bz2
nasm-9bd1506d5999d7c41a4cf6de2f43b97939bb260e.zip
Remove function pointers in output, simplify error handling
Remove a bunch of function pointers in the output stage; they are never changed and don't add any value. Also make "ofile" a global variable and let the backend use it directly. All we ever did with these variables were stashing it in locals and using them as-is anyway for no benefit. Also change the global error function, nasm_error() into a true function which invokes a function pointer internally. That lets us use direct calls to it. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'raa.c')
-rw-r--r--raa.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/raa.c b/raa.c
index 5d6c351..be912a4 100644
--- a/raa.c
+++ b/raa.c
@@ -92,8 +92,7 @@ struct RAA *raa_write(struct RAA *r, int32_t posn, int64_t value)
{
struct RAA *result;
- if (posn < 0)
- nasm_malloc_error(ERR_PANIC, "negative position in raa_write");
+ nasm_assert(posn >= 0);
while ((UINT32_C(1) << (r->shift + LAYERSHIFT(r))) <= (uint32_t) posn) {
/*