On Sat, 2009-11-14 at 12:56 -0700, David Brownell wrote: > On Saturday 14 November 2009, Zachary T Welch wrote: > > - for (unsigned i = 0, num_bytes = CEIL(size, 8); i < num_bytes; i++) > > - to[i] = from[i]; > > + // copy entire buffer > > + memcpy(_to, from, CEIL(size, 8)); > > Comment is wrong: copies all but trailing partial byte.
CEIL is a strange name for converting a bit count to byte count. From src/helper/binarybuffer.h: #define CEIL(m, n) (((m) + (n) - 1) / (n)) Or is my brain not interpreting that code correctly? --Z _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development