Enlightenment CVS committal Author : sebastid Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_con Modified Files: ecore_con_dns.c Log Message: More checking. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_con/ecore_con_dns.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- ecore_con_dns.c 16 Aug 2005 09:25:02 -0000 1.1 +++ ecore_con_dns.c 16 Aug 2005 10:48:46 -0000 1.2 @@ -104,8 +104,15 @@ /* remove whitespace */ p = strchr(buf, ' '); - while (isspace(*p)) + if (!p) + p = strchr(buf, '\t'); + if (!p) continue; + while ((*p) && (isspace(*p))) p++; + /* Remove trailing newline */ + p2 = strchr(buf, '\n'); + if (p2) + *p2 = 0; if (!strncmp(buf, "nameserver", 10)) { @@ -123,7 +130,7 @@ while ((p) && (_search_count < 6)) { /* Remove whitespace */ - while (isspace(*p)) + while ((*p) && (isspace(*p))) p++; /* Find next element */ p2 = strchr(p, ' '); ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs