mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
Replace MemSet with memset.
This commit is contained in:
@ -1218,7 +1218,7 @@ BOOL CALLBACK UruLoginDialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
|
||||
|
||||
SaveUserPass (pLoginParam, password);
|
||||
|
||||
MemSet(&pLoginParam->authError, 0, sizeof(pLoginParam->authError));
|
||||
memset(&pLoginParam->authError, 0, sizeof(pLoginParam->authError));
|
||||
bool cancelled = AuthenticateNetClientComm(&pLoginParam->authError, hwndDlg);
|
||||
|
||||
if (IS_NET_SUCCESS(pLoginParam->authError) && !cancelled)
|
||||
@ -1547,7 +1547,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC
|
||||
|
||||
bool needExit = false;
|
||||
LoginDialogParam loginParam;
|
||||
MemSet(&loginParam, 0, sizeof(loginParam));
|
||||
memset(&loginParam, 0, sizeof(loginParam));
|
||||
LoadUserPass(&loginParam);
|
||||
|
||||
if (!doIntroDialogs && loginParam.remember) {
|
||||
|
@ -1928,7 +1928,7 @@ void pfGUIMultiLineEditCtrl::DeleteLinesFromTop(int numLines)
|
||||
uint32_t newBufferStart = curChar + 1; // +1 so we eat the newline as well
|
||||
uint32_t newBufferLen = bufferLen - newBufferStart;
|
||||
MemCopy(buffer, buffer + newBufferStart, newBufferLen * sizeof(uint16_t)); // copy all bytes after the newline to the beginning
|
||||
MemSet(buffer + newBufferLen, 0, (bufferLen - newBufferLen) * sizeof(uint16_t)); // fill out the rest of the buffer with null chars
|
||||
memset(buffer + newBufferLen, 0, (bufferLen - newBufferLen) * sizeof(uint16_t)); // fill out the rest of the buffer with null chars
|
||||
bufferLen = newBufferLen;
|
||||
break;
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ ITicTacToe::ITicTacToe (pfGmTicTacToe * gameCli)
|
||||
: gameCli(gameCli)
|
||||
{
|
||||
// Fill the board with space chars
|
||||
MemSet(board, ' ', sizeof(board));
|
||||
memset(board, ' ', sizeof(board));
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
@ -679,10 +679,10 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtSendFriendInvite, args, "Params: emailAddress,
|
||||
}
|
||||
|
||||
wchar_t emailAddr[kMaxEmailAddressLength];
|
||||
MemSet(emailAddr, 0, sizeof(emailAddr));
|
||||
memset(emailAddr, 0, sizeof(emailAddr));
|
||||
|
||||
wchar_t toName[kMaxPlayerNameLength];
|
||||
MemSet(toName, 0, sizeof(toName));
|
||||
memset(toName, 0, sizeof(toName));
|
||||
|
||||
// Check and see if the email address is ok
|
||||
int origStrLen = 0;
|
||||
|
@ -190,7 +190,7 @@ void IcmpStartup () {
|
||||
IcmpCreateFile = (FIcmpCreateFile)GetProcAddress(g_lib, "IcmpCreateFile");
|
||||
IcmpSendEcho = (FIcmpSendEcho)GetProcAddress(g_lib, "IcmpSendEcho");
|
||||
}
|
||||
MemSet(s_payload, (uint8_t)((uintptr_t)&s_payload >> 4), arrsize(s_payload));
|
||||
memset(s_payload, (uint8_t)((uintptr_t)&s_payload >> 4), arrsize(s_payload));
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
@ -605,7 +605,7 @@ static void StartAuthTcpTest (
|
||||
void * param
|
||||
) {
|
||||
if (0 == AtomicSet(&s_authProtocolRegistered, 1)) {
|
||||
MemSet(
|
||||
memset(
|
||||
s_payload,
|
||||
(uint8_t)((uintptr_t)&s_payload >> 4),
|
||||
sizeof(s_payload)
|
||||
|
@ -217,7 +217,7 @@ T * TBuffer<T>::Detach () {
|
||||
template<class T>
|
||||
void TBuffer<T>::Fill (uint8_t value) {
|
||||
if (m_data)
|
||||
MemSet(m_data, value, Bytes());
|
||||
memset(m_data, value, Bytes());
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
@ -610,7 +610,7 @@ T * TFArray<T,C>::Detach () {
|
||||
template<class T, class C>
|
||||
void TFArray<T,C>::Fill (uint8_t value) {
|
||||
C::Destruct(m_data, m_count);
|
||||
MemSet(m_data, value, m_count * sizeof(T));
|
||||
memset(m_data, value, m_count * sizeof(T));
|
||||
C::Construct(m_data, m_count);
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ void * CBaseSpareList::Alloc (unsigned objectSize, const char typeName[]) {
|
||||
|
||||
// initialize memory to a freaky value in debug mode
|
||||
#ifdef HS_DEBUGGING
|
||||
MemSet(object, (uint8_t) ((unsigned) object >> 4), objectSize);
|
||||
memset(object, (uint8_t) ((unsigned) object >> 4), objectSize);
|
||||
#endif
|
||||
|
||||
return object;
|
||||
@ -91,7 +91,7 @@ void * CBaseSpareList::Alloc (unsigned objectSize, const char typeName[]) {
|
||||
void CBaseSpareList::Free (void * object, unsigned objectSize) {
|
||||
// initialize memory to a freaky value in debug mode
|
||||
#ifdef HS_DEBUGGING
|
||||
MemSet(object, (uint8_t) ((unsigned) object >> 4), objectSize);
|
||||
memset(object, (uint8_t) ((unsigned) object >> 4), objectSize);
|
||||
#endif
|
||||
|
||||
// link memory block onto head of spare list
|
||||
|
Reference in New Issue
Block a user