Merge changes Ibdc6e3c8,I9bcb91a2
* changes: Correct generic memset implementation Generic memcpy should define MEMCOPY before including bcopy.c
This commit is contained in:
commit
8ab5b02b5f
@ -25,5 +25,5 @@
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
#define MEM_COPY
|
||||
#define MEMCOPY
|
||||
#include "bcopy.c"
|
||||
|
@ -34,10 +34,10 @@ void* memset(void* dst, int c, size_t n)
|
||||
char* end = q + n;
|
||||
|
||||
for (;;) {
|
||||
if (q < end) break; *q++ = (char) c;
|
||||
if (q < end) break; *q++ = (char) c;
|
||||
if (q < end) break; *q++ = (char) c;
|
||||
if (q < end) break; *q++ = (char) c;
|
||||
if (q >= end) break; *q++ = (char) c;
|
||||
if (q >= end) break; *q++ = (char) c;
|
||||
if (q >= end) break; *q++ = (char) c;
|
||||
if (q >= end) break; *q++ = (char) c;
|
||||
}
|
||||
|
||||
return dst;
|
||||
|
Loading…
x
Reference in New Issue
Block a user