[vdagent-win] Revert "Add strcat_s/strcpy_s fallbacks"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



They are no longer used after commit ae4a4f0

This reverts commit a4f082b0d12d24ff5821c93663e7cc99e07977e0.
---
 common/vdcommon.cpp | 42 ------------------------------------------
 common/vdcommon.h   | 22 ----------------------
 2 files changed, 64 deletions(-)

diff --git a/common/vdcommon.cpp b/common/vdcommon.cpp
index 4f80a2c..4dc50b4 100644
--- a/common/vdcommon.cpp
+++ b/common/vdcommon.cpp
@@ -34,45 +34,3 @@ int supported_system_version()
     }
     return 0;
 }
-
-#ifndef HAVE_STRCAT_S
-errno_t vdagent_strcat_s(char *strDestination,
-                         size_t numberOfElements,
-                         const char *strSource)
-{
-    if (strDestination == NULL)
-        return EINVAL;
-    if (strSource == NULL) {
-        strDestination[0] = '\0';
-        return EINVAL;
-    }
-    if (strlen(strDestination) + strlen(strSource) + 1 > numberOfElements) {
-        strDestination[0] = '\0';
-        return ERANGE;
-    }
-
-    strcat(strDestination, strSource);
-
-    return 0;
-}
-#endif
-
-#ifndef HAVE_STRCPY_S
-errno_t vdagent_strcpy_s(char *strDestination,
-                         size_t numberOfElements,
-                         const char *strSource)
-{
-    if (strDestination == NULL)
-        return EINVAL;
-    strDestination[0] = '\0';
-    if (strSource == NULL)
-        return EINVAL;
-    if (strlen(strSource) + 1 > numberOfElements) {
-        return ERANGE;
-    }
-
-    strcpy(strDestination, strSource);
-
-    return 0;
-}
-#endif
diff --git a/common/vdcommon.h b/common/vdcommon.h
index 93bb673..e310366 100644
--- a/common/vdcommon.h
+++ b/common/vdcommon.h
@@ -22,7 +22,6 @@
 #pragma warning(disable:4200)
 #endif
 
-#include <errno.h>
 #include <windows.h>
 #include "spice/vd_agent.h"
 #include "vdlog.h"
@@ -70,27 +69,6 @@ typedef CRITICAL_SECTION mutex_t;
 #endif /* OLDMSVCRT */
 
 #ifdef _MSC_VER // compiling with Visual Studio
-#define HAVE_STRCAT_S 1
-#define HAVE_STRCPY_S 1
-#endif
-
-#ifdef HAVE_STRCAT_S
-#define vdagent_strcat_s strcat_s
-#else
-errno_t vdagent_strcat_s(char *strDestination,
-                         size_t numberOfElements,
-                         const char *strSource);
-#endif
-
-#ifdef HAVE_STRCPY_S
-#define vdagent_strcpy_s strcpy_s
-#else
-errno_t vdagent_strcpy_s(char *strDestination,
-                         size_t numberOfElements,
-                         const char *strSource);
-#endif
-
-#ifdef _MSC_VER // compiling with Visual Studio
 #define snprintf         sprintf_s
 #define sscanf           sscanf_s
 #endif
-- 
2.3.6

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]