From 59b2fd40eb3b248f88f972a6403d3f77bf4b5c0e Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Fri, 6 Feb 2015 12:54:46 +0100 Subject: Use new vdagent_{strncpy,strcat}_s helpers --- common/vdcommon.cpp | 8 ++++++-- common/vdcommon.h | 5 +++-- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'common') diff --git a/common/vdcommon.cpp b/common/vdcommon.cpp index 40c9e13..5b52b1a 100644 --- a/common/vdcommon.cpp +++ b/common/vdcommon.cpp @@ -49,7 +49,9 @@ errno_t vdagent_strcat_s(char *strDestination, return ERANGE; } - return strcat(strDestination, strSource); + strcat(strDestination, strSource); + + return 0; } #endif @@ -67,6 +69,8 @@ errno_t vdagent_strcpy_s(char *strDestination, return ERANGE; } - return strcpy(strDestination, strSource); + strcpy(strDestination, strSource); + + return 0; } #endif diff --git a/common/vdcommon.h b/common/vdcommon.h index 01bbbc8..db9257f 100644 --- a/common/vdcommon.h +++ b/common/vdcommon.h @@ -22,6 +22,7 @@ #pragma warning(disable:4200) #endif +#include #include #include "spice/vd_agent.h" #include "vdlog.h" @@ -78,7 +79,7 @@ typedef CRITICAL_SECTION mutex_t; #else errno_t vdagent_strcat_s(char *strDestination, size_t numberOfElements, - const char *strSource) + const char *strSource); #endif #ifdef HAVE_STRCPY_S @@ -86,7 +87,7 @@ errno_t vdagent_strcat_s(char *strDestination, #else errno_t vdagent_strcpy_s(char *strDestination, size_t numberOfElements, - const char *strSource) + const char *strSource); #endif #ifdef _MSC_VER // compiling with Visual Studio -- cgit v1.2.3