summaryrefslogtreecommitdiff
path: root/src/lib/eolian/database_type.c
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2016-03-11 13:04:33 +0000
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2016-03-11 13:04:41 +0000
commitc420cbe9f02d134d691402a115c00674b5ba37ae (patch)
treeb5e6511573ac4217bd75ad5d8eadae494602648e /src/lib/eolian/database_type.c
parent8a56f5c98e04bdb945cc9ef82d24d0bf9c52f62c (diff)
eolian: refactor database_typedecl_to_str to remove dead code
After the type system transition there was some unnecessary dead code. Fixes CID 1352512.
Diffstat (limited to '')
-rw-r--r--src/lib/eolian/database_type.c30
1 files changed, 11 insertions, 19 deletions
diff --git a/src/lib/eolian/database_type.c b/src/lib/eolian/database_type.c
index ec3b9a8303..749281b6f6 100644
--- a/src/lib/eolian/database_type.c
+++ b/src/lib/eolian/database_type.c
@@ -217,27 +217,19 @@ _atype_to_str(const Eolian_Typedecl *tp, Eina_Strbuf *buf)
217void 217void
218database_typedecl_to_str(const Eolian_Typedecl *tp, Eina_Strbuf *buf, const char *name) 218database_typedecl_to_str(const Eolian_Typedecl *tp, Eina_Strbuf *buf, const char *name)
219{ 219{
220 if (tp->type == EOLIAN_TYPEDECL_ALIAS) 220 switch (tp->type)
221 { 221 {
222 case EOLIAN_TYPEDECL_ALIAS:
222 _atype_to_str(tp, buf); 223 _atype_to_str(tp, buf);
223 return; 224 break;
224 } 225 case EOLIAN_TYPEDECL_ENUM:
225 else if (tp->type == EOLIAN_TYPEDECL_STRUCT
226 || tp->type == EOLIAN_TYPEDECL_STRUCT_OPAQUE)
227 {
228 _stype_to_str(tp, buf, name);
229 return;
230 }
231 else if (tp->type == EOLIAN_TYPEDECL_ENUM)
232 {
233 _etype_to_str(tp, buf, name); 226 _etype_to_str(tp, buf, name);
234 return; 227 break;
235 } 228 case EOLIAN_TYPEDECL_STRUCT:
236 else 229 case EOLIAN_TYPEDECL_STRUCT_OPAQUE:
237 return; 230 _stype_to_str(tp, buf, name);
238 if (name) 231 break;
239 { 232 default:
240 eina_strbuf_append_char(buf, ' '); 233 break;
241 eina_strbuf_append(buf, name);
242 } 234 }
243} 235}