On Thursday, October 18, 2012, Enlightenment SVN wrote: > Log: > eina: eina_stringshare_add_lenght better to > return NULL when func args are wrong. > > Patch by Patryk Kaczmarek <patry...@samsung.com <javascript:;>> > > > Author: cedric > Date: 2012-10-18 18:25:17 -0700 (Thu, 18 Oct 2012) > New Revision: 78209 > Trac: http://trac.enlightenment.org/e/changeset/78209 > > Modified: > trunk/eina/src/lib/eina_stringshare.c > > Modified: trunk/eina/src/lib/eina_stringshare.c > =================================================================== > --- trunk/eina/src/lib/eina_stringshare.c 2012-10-19 01:16:09 UTC > (rev 78208) > +++ trunk/eina/src/lib/eina_stringshare.c 2012-10-19 01:25:17 UTC > (rev 78209) > @@ -612,7 +612,7 @@ > eina_stringshare_add_length(const char *str, unsigned int slen) > { > if ((!str) || (slen <= 0)) > - return ""; > + return NULL;
This is wrong for slen == 0 and str is provided. > else if (slen == 1) > return (Eina_Stringshare *) _eina_stringshare_single + ((*str) << 1); > else if (slen < 4) > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > enlightenment-svn mailing list > enlightenment-...@lists.sourceforge.net <javascript:;> > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn > -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel