diff options
author | George Hazan <george.hazan@gmail.com> | 2014-07-16 13:43:06 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-07-16 13:43:06 +0000 |
commit | eefe0f0d556fbf3d77602d0a99b9134505050756 (patch) | |
tree | 41eef7b1ea9fca98c8e22be29ba0eb07fffb19e1 /src/modules/utils | |
parent | 9d8530d69c5896d91e8e9468e769a4eafb9cc53b (diff) |
in _tcsncpy_s / _tcsncat_s / strncpy_s / strncat_s the second parameter to be omitted if the size of first one is fixed (not to contaminate sources with the excessive code)
git-svn-id: http://svn.miranda-ng.org/main/trunk@9829 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/utils')
-rw-r--r-- | src/modules/utils/path.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/utils/path.cpp b/src/modules/utils/path.cpp index 2a4bcaa530..0bd1e79383 100644 --- a/src/modules/utils/path.cpp +++ b/src/modules/utils/path.cpp @@ -178,7 +178,7 @@ static __forceinline char *GetPathVarX(char *, int code) switch(code) {
case 1:
if (hAvatarFolder != NULL)
- _tcsncpy_s(szFullPath, SIZEOF(szFullPath), tszAvatarRoot, _TRUNCATE);
+ _tcsncpy_s(szFullPath, tszAvatarRoot, _TRUNCATE);
else
mir_sntprintf(szFullPath, SIZEOF(szFullPath), _T("%s\\%s\\AvatarCache"), g_profileDir, g_shortProfileName);
break;
@@ -262,7 +262,7 @@ static __forceinline TCHAR *GetPathVarX(TCHAR *, int code) switch(code) {
case 1:
if (hAvatarFolder != NULL)
- _tcsncpy_s(szFullPath, SIZEOF(szFullPath), tszAvatarRoot, _TRUNCATE);
+ _tcsncpy_s(szFullPath, tszAvatarRoot, _TRUNCATE);
else
mir_sntprintf(szFullPath, SIZEOF(szFullPath), _T("%s\\%s\\AvatarCache"), g_profileDir, g_shortProfileName);
break;
@@ -434,7 +434,7 @@ static int OnFoldersChanged(WPARAM, LPARAM) TCHAR tmpVar[MAX_PATH];
if (!FoldersGetCustomPathT(hAvatarFolder, tmpVar, SIZEOF(tmpVar), tszAvatarRoot))
- _tcsncpy_s(tszAvatarRoot, SIZEOF(tszAvatarRoot), tmpVar, SIZEOF(tmpVar));
+ _tcsncpy_s(tszAvatarRoot, tmpVar, _TRUNCATE);
return 0;
}
@@ -444,7 +444,7 @@ void InitPathVar() if (hAvatarFolder = FoldersRegisterCustomPathT( LPGEN("Avatars"), LPGEN("Avatars root folder"), tszAvatarRoot)) {
TCHAR tmpVar[MAX_PATH];
if (!FoldersGetCustomPathT(hAvatarFolder, tmpVar, SIZEOF(tmpVar), tszAvatarRoot))
- _tcsncpy_s(tszAvatarRoot, SIZEOF(tszAvatarRoot), tmpVar, SIZEOF(tmpVar));
+ _tcsncpy_s(tszAvatarRoot, tmpVar, _TRUNCATE);
HookEvent(ME_FOLDERS_PATH_CHANGED, OnFoldersChanged);
}
}
|