summaryrefslogtreecommitdiff
path: root/py/objfun.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-01-14 21:32:42 +0000
committerDamien George <damien.p.george@gmail.com>2015-01-14 21:32:42 +0000
commitd2d64f00fb7f1487c1fa21a456e003a801d7e711 (patch)
tree7345a9ba92baed508c4287bfca5ab09d67290821 /py/objfun.c
parent65ef6b768cbba6a55f28c13433c3763c6567045e (diff)
py: Add "default" to switches to allow better code flow analysis.
This helps compiler produce smaller code. Saves 124 bytes on stmhal and bare-arm.
Diffstat (limited to 'py/objfun.c')
-rw-r--r--py/objfun.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/py/objfun.c b/py/objfun.c
index 6ef12c910..8f835726d 100644
--- a/py/objfun.c
+++ b/py/objfun.c
@@ -83,11 +83,8 @@ STATIC mp_obj_t fun_builtin_call(mp_obj_t self_in, mp_uint_t n_args, mp_uint_t n
return ((mp_fun_2_t)self->fun)(args[0], args[1]);
case 3:
- return ((mp_fun_3_t)self->fun)(args[0], args[1], args[2]);
-
default:
- assert(0);
- return mp_const_none;
+ return ((mp_fun_3_t)self->fun)(args[0], args[1], args[2]);
}
} else {