On 26/03/12 20:51, Vikram Narayanan wrote: > In ecrire, > Check return values of *alloc functions, though its unlikely to > fail. There are chances though! > > Comments please.
Dear Vikram, Thanks a lot for your patch. As explained by others in this thread, the reason I didn't add allocation checks is that because it's a reasonable assumption to assume that if you can't allocate 400 bytes (or some other small amount), something will go wrong anyway. Nothing can really work this way anyway, so I just didn't bother. It's just a lot of handling and making the code uglier for no benefit. Also, regarding your patches: They look great, except for in patch #2, that it seems that: @@ -110,10 +116,15 @@ end: if (!_ent_cfg) { _ent_cfg = _ecrire_cfg_new(); + if (!_ent_cfg) + goto exit; Will not eet_close "ef" as it should (maybe I'm missing something, but it seems like it at first glance). Anyhow, as I said, I (and others) usually don't bother with handling such error conditions because the overhead involved (in programming time and code ugliness) comparing to the benefits (cleanly exciting vs crashing) are just not worth it. I hope to see more patches from you in the future. Thanks, Tom. ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel