[Spice-commits] common/vdcommon.cpp common/vdcommon.h
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Apr 30 08:22:32 UTC 2019
common/vdcommon.cpp | 42 ------------------------------------------
common/vdcommon.h | 24 ------------------------
2 files changed, 66 deletions(-)
New commits:
commit 4d4977611f8706caebf21e2866db842ce3de2544
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Tue Mar 5 13:49:41 2019 +0000
Remove some unused definitions
_ftime_s, vdagent_strcat_s and vdagent_strcpy_s are not used.
Code is using different string functions.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Victor Toso <victortoso at redhat.com>
diff --git a/common/vdcommon.cpp b/common/vdcommon.cpp
index 36faa2d..bd746bd 100644
--- a/common/vdcommon.cpp
+++ b/common/vdcommon.cpp
@@ -37,48 +37,6 @@ SystemVersion supported_system_version()
return SYS_VER_UNSUPPORTED;
}
-#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
-
#ifndef HAVE_SWPRINTF_S
int vdagent_swprintf_s(wchar_t *buf, size_t len, const wchar_t *format, ...)
{
diff --git a/common/vdcommon.h b/common/vdcommon.h
index ac58efe..c846a7b 100644
--- a/common/vdcommon.h
+++ b/common/vdcommon.h
@@ -84,34 +84,10 @@ typedef Mutex mutex_t;
* Currently Visual Studio builds are built with /MT (static mode) such that
* those functions are not required to be in that dll on the guest.
*/
-#ifdef OLDMSVCRT
-#ifndef _ftime_s
-#define _ftime_s(timeb) _ftime(timeb)
-#endif
-#endif /* OLDMSVCRT */
-
#ifdef _MSC_VER // compiling with Visual Studio
-#define HAVE_STRCAT_S 1
-#define HAVE_STRCPY_S 1
#define HAVE_SWPRINTF_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
-
#ifndef HAVE_SWPRINTF_S
int vdagent_swprintf_s(wchar_t *buf, size_t len, const wchar_t *format, ...);
#define swprintf_s vdagent_swprintf_s
More information about the Spice-commits
mailing list