aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShraddha Barke <shraddha.6596@gmail.com>2015-09-05 00:50:28 +0530
committerMichael Tokarev <mjt@tls.msk.ru>2015-09-11 10:21:38 +0300
commit74c373e42f3dccae3b3b1e91a82ab8f748a39a6f (patch)
treea35957c1d4bf3089ec40d0750d33f83190150a41
parent70cbae1dd85c9b4bb7c42bb282baacaaed0dd9bd (diff)
Target-ppc: Remove unnecessary variable
Compress lines and remove the variable ret. Change made using Coccinelle script @@ expression ret; @@ - if (ret) return ret; - return 0; + return ret; @@ local idexpression ret; expression e; @@ - ret = e; - return ret; + return e; @@ type T; identifier i; @@ - T i; ... when != i Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-rw-r--r--target-ppc/translate_init.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index 16d7b16ac2..b54147350d 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -8577,11 +8577,7 @@ static int register_ind_insn (opc_handler_t **ppc_opcodes,
unsigned char idx1, unsigned char idx2,
opc_handler_t *handler)
{
- int ret;
-
- ret = register_ind_in_table(ppc_opcodes, idx1, idx2, handler);
-
- return ret;
+ return register_ind_in_table(ppc_opcodes, idx1, idx2, handler);
}
static int register_dblind_insn (opc_handler_t **ppc_opcodes,
@@ -9350,8 +9346,7 @@ static ObjectClass *ppc_cpu_class_by_name(const char *name)
break;
}
if (i == 8) {
- ret = OBJECT_CLASS(ppc_cpu_class_by_pvr(strtoul(name, NULL, 16)));
- return ret;
+ return OBJECT_CLASS(ppc_cpu_class_by_pvr(strtoul(name, NULL, 16)));
}
}