From 4d02ededde9d70c9eafc7dfd0c350110de2a6dcd Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Wed, 2 May 2012 00:09:45 +0400 Subject: nasmlib: Shrink idata_bytes Signed-off-by: Cyrill Gorcunov --- nasmlib.c | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) (limited to 'nasmlib.c') 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; } -- cgit v1.2.3