From 3e102800404c38bc615cc06fd7117f2b4daeb6c5 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 7 Jul 2012 08:29:51 +0000 Subject: removed mir_free_and_nil for local buffers git-svn-id: http://svn.miranda-ng.org/main/trunk@809 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/modern_skinselector.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'plugins/Clist_modern/modern_skinselector.cpp') diff --git a/plugins/Clist_modern/modern_skinselector.cpp b/plugins/Clist_modern/modern_skinselector.cpp index 3b4f00ba23..45f66d51bb 100644 --- a/plugins/Clist_modern/modern_skinselector.cpp +++ b/plugins/Clist_modern/modern_skinselector.cpp @@ -186,7 +186,7 @@ lph_top: //only 4 of 9 instructions in here don't use AL, so optimal pipe use i DWORD hash = 0; int i; int shift = 0; - for(i=0;szStr[i];i++) { + for (i=0;szStr[i];i++) { hash ^= szStr[i] << shift; if (shift>24) hash ^= (szStr[i]>>(32-shift))&0x7F; shift = (shift+5)&0x1F; @@ -225,10 +225,9 @@ int ClearMaskList(LISTMODERNMASK * mmTemplateList) int i; if (!mmTemplateList) return -1; if (!mmTemplateList->pl_Masks) return -1; - for(i=0; i < (int)mmTemplateList->dwMaskCnt; i++) + for (i=0; i < (int)mmTemplateList->dwMaskCnt; i++) SkinSelector_DeleteMask(&(mmTemplateList->pl_Masks[i])); - mir_free_and_nill(mmTemplateList->pl_Masks); - mmTemplateList->pl_Masks = NULL; + mir_free_and_nil(mmTemplateList->pl_Masks); mmTemplateList->dwMaskCnt = 0; return 0; } @@ -239,7 +238,7 @@ int DeleteMaskByItID(DWORD mID,LISTMODERNMASK * mmTemplateList) if (mmTemplateList->dwMaskCnt == 1) { SkinSelector_DeleteMask(&(mmTemplateList->pl_Masks[0])); - mir_free_and_nill(mmTemplateList->pl_Masks); + mir_free_and_nil(mmTemplateList->pl_Masks); mmTemplateList->pl_Masks = NULL; mmTemplateList->dwMaskCnt; } @@ -255,7 +254,7 @@ int DeleteMaskByItID(DWORD mID,LISTMODERNMASK * mmTemplateList) newAlocation[i] = mmTemplateList->pl_Masks[i+1]; newAlocation[i].dwMaskId = i; } - mir_free_and_nill(mmTemplateList->pl_Masks); + mir_free_and_nil(mmTemplateList->pl_Masks); mmTemplateList->pl_Masks = newAlocation; mmTemplateList->dwMaskCnt--; } @@ -575,7 +574,7 @@ TCHAR * GetParamNT(char * string, TCHAR * buf, int buflen, BYTE paramN, char Del char *ansibuf = (char*)mir_alloc(buflen/sizeof(TCHAR)); GetParamN(string, ansibuf, buflen/sizeof(TCHAR), paramN, Delim, SkipSpaces); MultiByteToWideChar(CP_UTF8,0,ansibuf,-1,buf,buflen); - mir_free_and_nill(ansibuf); + mir_free(ansibuf); return buf; } @@ -746,8 +745,8 @@ int RegisterObjectByParce(char * ObjectName, char * Params) } obj.Data = ≷ res = ske_AddDescriptorToSkinObjectList(&obj,NULL); - mir_free_and_nill(obj.szObjectID); - if (gl.szFileName) mir_free_and_nill(gl.szFileName); + mir_free_and_nil(obj.szObjectID); + mir_free_and_nil(gl.szFileName); return res; } break; -- cgit v1.2.3