summaryrefslogtreecommitdiff
path: root/src/bin/eolian/eo1_generator.c
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2014-03-07 10:43:56 +0200
committerDaniel Zaoui <daniel.zaoui@samsung.com>2014-03-07 17:42:41 +0200
commitbb8af681f96f13c4e12b9f1762dfaacc5cc4b01c (patch)
tree8942d720ff0f2518ec6b10a9d2919c3fa4f0b862 /src/bin/eolian/eo1_generator.c
parent445059e706a6f7e47e66fa21e1711ce6a2c9e571 (diff)
Eolian: Coverity fixes
Diffstat (limited to '')
-rw-r--r--src/bin/eolian/eo1_generator.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/bin/eolian/eo1_generator.c b/src/bin/eolian/eo1_generator.c
index 1fbdca990a..8ce195c2e4 100644
--- a/src/bin/eolian/eo1_generator.c
+++ b/src/bin/eolian/eo1_generator.c
@@ -496,6 +496,7 @@ eo1_source_beginning_generate(const char *classname, Eina_Strbuf *buf)
496Eina_Bool 496Eina_Bool
497eo1_source_end_generate(const char *classname, Eina_Strbuf *buf) 497eo1_source_end_generate(const char *classname, Eina_Strbuf *buf)
498{ 498{
499 Eina_Bool ret = EINA_FALSE;
499 const Eina_List *itr; 500 const Eina_List *itr;
500 Eolian_Function fn; 501 Eolian_Function fn;
501 502
@@ -530,6 +531,7 @@ eo1_source_end_generate(const char *classname, Eina_Strbuf *buf)
530 Eina_Strbuf *str_func = eina_strbuf_new(); 531 Eina_Strbuf *str_func = eina_strbuf_new();
531 Eina_Strbuf *str_bodyf = eina_strbuf_new(); 532 Eina_Strbuf *str_bodyf = eina_strbuf_new();
532 Eina_Strbuf *str_ev = eina_strbuf_new(); 533 Eina_Strbuf *str_ev = eina_strbuf_new();
534 Eina_Strbuf *tmpl_impl = eina_strbuf_new();
533 535
534 _template_fill(str_end, tmpl_eo_src_end, classname, "", EINA_TRUE); 536 _template_fill(str_end, tmpl_eo_src_end, classname, "", EINA_TRUE);
535 537
@@ -578,7 +580,7 @@ eo1_source_end_generate(const char *classname, Eina_Strbuf *buf)
578 580
579 eolian_implement_information_get(impl_desc, &impl_class, &funcname, &ftype); 581 eolian_implement_information_get(impl_desc, &impl_class, &funcname, &ftype);
580 582
581 Eina_Strbuf *tmpl_impl = eina_strbuf_new(); 583 eina_strbuf_reset(tmpl_impl);
582 eina_strbuf_append(tmpl_impl, tmpl_eo_func_desc); 584 eina_strbuf_append(tmpl_impl, tmpl_eo_func_desc);
583 585
584 char implname[0xFF]; 586 char implname[0xFF];
@@ -603,7 +605,7 @@ eo1_source_end_generate(const char *classname, Eina_Strbuf *buf)
603 if (!in_meth && !in_prop) 605 if (!in_meth && !in_prop)
604 { 606 {
605 ERR ("Failed to generate implementation of %s:%s - missing form super class", impl_class, funcname); 607 ERR ("Failed to generate implementation of %s:%s - missing form super class", impl_class, funcname);
606 return EINA_FALSE; 608 goto end;
607 } 609 }
608 610
609 if (in_meth) 611 if (in_meth)
@@ -635,7 +637,6 @@ eo1_source_end_generate(const char *classname, Eina_Strbuf *buf)
635 eo1_bind_func_generate(classname, in_prop, GET, str_bodyf, impl_class); 637 eo1_bind_func_generate(classname, in_prop, GET, str_bodyf, impl_class);
636 } 638 }
637 } 639 }
638 eina_strbuf_free(tmpl_impl);
639 } 640 }
640 641
641 //Constructors 642 //Constructors
@@ -749,13 +750,16 @@ eo1_source_end_generate(const char *classname, Eina_Strbuf *buf)
749 750
750 eina_strbuf_append(buf, eina_strbuf_string_get(str_end)); 751 eina_strbuf_append(buf, eina_strbuf_string_get(str_end));
751 752
753 ret = EINA_TRUE;
754end:
752 eina_strbuf_free(tmpbuf); 755 eina_strbuf_free(tmpbuf);
753 eina_strbuf_free(str_op); 756 eina_strbuf_free(str_op);
754 eina_strbuf_free(str_func); 757 eina_strbuf_free(str_func);
755 eina_strbuf_free(str_bodyf); 758 eina_strbuf_free(str_bodyf);
756 eina_strbuf_free(str_end); 759 eina_strbuf_free(str_end);
757 eina_strbuf_free(str_ev); 760 eina_strbuf_free(str_ev);
761 eina_strbuf_free(tmpl_impl);
758 762
759 return EINA_TRUE; 763 return ret;
760} 764}
761 765