summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2012-05-02 00:09:45 +0400
committerCyrill Gorcunov <gorcunov@gmail.com>2012-05-02 00:19:38 +0400
commit4d02ededde9d70c9eafc7dfd0c350110de2a6dcd (patch)
treed2ab44654db7d4e5266edbeb2be757151170e0cb
parentc33f05a9c7e2975d80bcb9cb4ea948bb00805f0c (diff)
downloadnasm-4d02ededde9d70c9eafc7dfd0c350110de2a6dcd.tar.gz
nasm-4d02ededde9d70c9eafc7dfd0c350110de2a6dcd.tar.bz2
nasm-4d02ededde9d70c9eafc7dfd0c350110de2a6dcd.zip
nasmlib: Shrink idata_bytes
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r--nasmlib.c29
1 files changed, 9 insertions, 20 deletions
diff --git a/nasmlib.c b/nasmlib.c
index 254c84c..2367ff3 100644
--- a/nasmlib.c
+++ b/nasmlib.c
@@ -775,35 +775,24 @@ char *nasm_opt_val(char *p, char **val, char **next)
*/
int idata_bytes(int opcode)
{
- int ret;
switch (opcode) {
case I_DB:
- ret = 1;
- break;
+ return 1;
case I_DW:
- ret = 2;
- break;
+ return 2;
case I_DD:
- ret = 4;
- break;
+ return 4;
case I_DQ:
- ret = 8;
- break;
+ return 8;
case I_DT:
- ret = 10;
- break;
+ return 10;
case I_DO:
- ret = 16;
- break;
+ return 16;
case I_DY:
- ret = 32;
- break;
+ return 32;
case I_none:
- ret = -1;
- break;
+ return -1;
default:
- ret = 0;
- break;
+ return 0;
}
- return ret;
}