Enlightenment CVS committal Author : raster Project : e17 Module : libs/edje
Dir : e17/libs/edje/src/bin Modified Files: edje_cc_out.c edje_cc_parse.c Log Message: formattign and allocs... =================================================================== RCS file: /cvs/e/e17/libs/edje/src/bin/edje_cc_out.c,v retrieving revision 1.55 retrieving revision 1.56 diff -u -3 -r1.55 -r1.56 --- edje_cc_out.c 31 Mar 2007 10:33:23 -0000 1.55 +++ edje_cc_out.c 21 Jul 2007 05:06:39 -0000 1.56 @@ -700,7 +700,12 @@ data = malloc(size); if (data) { - fread(data, size, 1, f); + if (fread(data, size, 1, f) != 1) + { + fprintf(stderr, "%s: Error. unable to read all of script object \"%s\"\n", + progname, tmpo); + ABORT_WRITE(ef, file_out); + } snprintf(buf, sizeof(buf), "scripts/%i", i); bt = eet_write(ef, buf, data, size, 1); free(data); @@ -1084,12 +1089,12 @@ { /* concat strings like "foo""bar" to "foobar" */ if (*(pp + 1) == '\"') - pp++; + pp++; else - { - name[i] = 0; - break; - } + { + name[i] = 0; + break; + } } else { =================================================================== RCS file: /cvs/e/e17/libs/edje/src/bin/edje_cc_parse.c,v retrieving revision 1.44 retrieving revision 1.45 diff -u -3 -r1.44 -r1.45 --- edje_cc_parse.c 11 Jul 2007 20:47:28 -0000 1.44 +++ edje_cc_parse.c 21 Jul 2007 05:06:39 -0000 1.45 @@ -212,7 +212,7 @@ pp++; } l = pp - p; - tmpstr = malloc(l + 1); + tmpstr = alloca(l + 1); if (!tmpstr) { fprintf(stderr, "%s: Error. %s:%i malloc %i bytes failed\n", @@ -228,7 +228,6 @@ line = nm; file_in = file_buf; } - free(tmpstr); } else if ((!in_comment_ss) && (!in_comment_sa) && (!in_comment_cpp)) { ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs