1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

Update libc/string/memset.cpp to current coding conventions.

This commit is contained in:
Jonas 'Sortie' Termansen 2014-06-20 18:26:03 +02:00
parent fcf412e54c
commit ebadcf2c02

View file

@ -1,6 +1,6 @@
/******************************************************************************* /*******************************************************************************
Copyright(C) Jonas 'Sortie' Termansen 2011, 2012. Copyright(C) Jonas 'Sortie' Termansen 2011, 2012, 2014.
This file is part of the Sortix C Library. This file is part of the Sortix C Library.
@ -22,13 +22,12 @@
*******************************************************************************/ *******************************************************************************/
#include <stdint.h>
#include <string.h> #include <string.h>
extern "C" void* memset(void* destptr, int value, size_t length) extern "C" void* memset(void* dest_ptr, int value, size_t length)
{ {
uint8_t* dest = (uint8_t*) destptr; unsigned char* dest = (unsigned char*) dest_ptr;
for ( size_t i = 0; i < length; i++ ) for ( size_t i = 0; i < length; i++ )
dest[i] = value & 0xFF; dest[i] = (unsigned char) value;
return destptr; return dest_ptr;
} }