why not if (!str || !delim || !element) return NULL;
? Vincent On Tue, Aug 28, 2012 at 2:37 PM, Enlightenment SVN <no-re...@enlightenment.org> wrote: > Log: > null checks for str split > > > Author: discomfitor > Date: 2012-08-28 05:37:02 -0700 (Tue, 28 Aug 2012) > New Revision: 75787 > Trac: http://trac.enlightenment.org/e/changeset/75787 > > Modified: > trunk/eina/src/lib/eina_str.c > > Modified: trunk/eina/src/lib/eina_str.c > =================================================================== > --- trunk/eina/src/lib/eina_str.c 2012-08-28 12:29:34 UTC (rev 75786) > +++ trunk/eina/src/lib/eina_str.c 2012-08-28 12:37:02 UTC (rev 75787) > @@ -77,6 +77,10 @@ > unsigned int tokens = 0, x; > const char *idx[256] = {NULL}; > > + > + if (!str) return NULL; > + if (!delim) return NULL; > + if (!elements) return NULL; > if (max_tokens < 0) max_tokens = 0; > if (max_tokens == 1) > { > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > enlightenment-svn mailing list > enlightenment-...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel