On 09/23/2013 07:52 PM, Scott Talbert wrote: >>> + char *xml_buffer = new char[xml_buffer_len]; >>> + uint16_t checksum = mh_get_checksum(in, size); >>> + int xml_len = snprintf(xml_buffer, xml_buffer_len, mh_config_header, >>> + size, size - 6, checksum, ri.skin); >>> + if (xml_len >= xml_buffer_len) { >>> + debug("Error, XML buffer length exceeded"); >>> + return LC_ERROR; >>> + } >>> + struct zip_source *xml = zip_source_buffer(zip, xml_buffer, xml_len, >>> 0); >> >> why not use freep and let it free this on it's own? > > What's freep?
freep is the last arg to zip_source_buffer(). From the man page: If freep is non-zero, the buffer will be freed when it is no longer needed. > It looks like zip_file_add() must've just been added in the most recent > release. I figure we should probably stick with the older function until > the new one has been out for longer. Sounds good. -- Phil Dibowitz p...@ipom.com Open Source software and tech docs Insanity Palace of Metallica http://www.phildev.net/ http://www.ipom.com/ "Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind." - Dr. Seuss
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________ concordance-devel mailing list concordance-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/concordance-devel