summaryrefslogtreecommitdiff
path: root/vdagent
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2013-07-17 20:43:41 +0200
committerMarc-André Lureau <marcandre.lureau@gmail.com>2013-07-17 20:45:22 +0200
commit492ee05a6bd92acc94557a129cd609d66785dac2 (patch)
tree92878c6b454636c7485b3bb846d883ecc4263ce4 /vdagent
parent5129f33899805b55915e506d392c89421db538a2 (diff)
Replace sscanf_s by sscanf
The _s functions need a recent msvcrt version, not shipped in XP by default. Furthermore, it appears that their sscanf_s usage was missing the extra buffer size argument.
Diffstat (limited to 'vdagent')
-rw-r--r--vdagent/file_xfer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/vdagent/file_xfer.cpp b/vdagent/file_xfer.cpp
index 9d2f3c5..84f6043 100644
--- a/vdagent/file_xfer.cpp
+++ b/vdagent/file_xfer.cpp
@@ -182,7 +182,7 @@ bool FileXfer::g_key_get_string(char* data, const char* group, const char* key,
next_group_pos = strstr(group_pos + strlen(group_pfx), "[");
if (next_group_pos && key_pos > next_group_pos) return false;
- return !!sscanf_s(key_pos + strlen(key_pfx), "%s\n", value);
+ return !!sscanf(key_pos + strlen(key_pfx), "%s\n", value);
}
bool FileXfer::g_key_get_uint64(char* data, const char* group, const char* key, uint64_t* value)
@@ -190,5 +190,5 @@ bool FileXfer::g_key_get_uint64(char* data, const char* group, const char* key,
char str[G_KEY_MAX_LEN];
if (!g_key_get_string(data, group, key, str)) return false;
- return !!sscanf_s(str, "%llu", value);
+ return !!sscanf(str, "%" PRIu64, value);
}