Peter, I’m not understanding the below change. Can you explain it?
The if check is making sure the scanf succeeded before allowing the loop to continue. Per the preceding comment, this is to make sure that a delimiter is present. Your change ensures that a delimiter is NOT present, no? Just wondering if the problem is actually a caller was missing a delimiter that was expected, or the delimiter checking logic is wrong. Cheers! Sean On Dec 26, 2014, at 10:06 AM, [email protected] wrote: > Revision: 63845 > http://sourceforge.net/p/brlcad/code/63845 > Author: peter-sa > Date: 2014-12-26 15:06:37 +0000 (Fri, 26 Dec 2014) > Log Message: > ----------- > Apply GCI task > http://www.google-melange.com/gci/task/view/google/gci2014/4967862338846720 > that fixes bu_scan_fastf_t by updating the value that it checks return value > of scanf() against when scanning the delimiter. > > Modified Paths: > -------------- > brlcad/trunk/src/libbu/scan.c > > Modified: brlcad/trunk/src/libbu/scan.c > =================================================================== > --- brlcad/trunk/src/libbu/scan.c 2014-12-24 22:06:22 UTC (rev 63844) > +++ brlcad/trunk/src/libbu/scan.c 2014-12-26 15:06:37 UTC (rev 63845) > @@ -77,7 +77,7 @@ > part_n = scanf(delim_fmt, &len); > > offset += len; > - if (part_n != 1 || len != delim_len) { break; } > + if (part_n != 0 || len != delim_len) { break; } > } > > va_end(ap); > > This was sent by the SourceForge.net collaborative development platform, the > world's largest Open Source development site. > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net > _______________________________________________ > BRL-CAD Source Commits mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/brlcad-commits ------------------------------------------------------------------------------ Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net _______________________________________________ BRL-CAD Developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/brlcad-devel
