diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2012-12-20 20:25:32 +0100 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2013-01-22 12:43:44 +0100 |
commit | 1e543873ead9507cc62f615c6cf0cc283733a97b (patch) | |
tree | 59e8f27285347dc686249960fedcd91beb5f7838 /common | |
parent | 9a0b939de12934674b80795615160f15fcd4f50e (diff) |
vdlog: Get swprinft_s definition from vdcommon.h
vdlog.cpp has an #ifdef check for OLDMSVC to choose between using
swprintf or swprintf_s. Since vdcommon.h provides a compat #define
for swprintf_s when OLDMSVC is set, it's better to use this one.
Diffstat (limited to 'common')
-rw-r--r-- | common/vdlog.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/common/vdlog.cpp b/common/vdlog.cpp index f84b5b3..76f4297 100644 --- a/common/vdlog.cpp +++ b/common/vdlog.cpp @@ -15,6 +15,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "vdcommon.h" #include "vdlog.h" #include <stdio.h> #include <stdarg.h> @@ -52,11 +53,7 @@ VDLog* VDLog::get(TCHAR* path) } if (size != INVALID_FILE_SIZE && size > LOG_ROLL_SIZE) { TCHAR roll_path[MAX_PATH]; -#ifdef OLDMSVCRT - swprintf(roll_path, L"%s.1", path); -#else swprintf_s(roll_path, MAX_PATH, L"%s.1", path); -#endif if (!MoveFileEx(path, roll_path, MOVEFILE_REPLACE_EXISTING)) { return NULL; } |