Commit 843d9f4c authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Fixed Android compil

parent 75206150
......@@ -212,7 +212,7 @@ char * linphone_timestamp_to_rfc3339_string(time_t timestamp) {
int n = snprintf(0, 0, "%4d-%02d-%02dT%02d:%02d:%02dZ",
ret->tm_year + 1900, ret->tm_mon + 1, ret->tm_mday, ret->tm_hour, ret->tm_min, ret->tm_sec);
char *timestamp_str = (char *) ms_malloc(n + 1);
snprintf(timestamp_str, n + 1, "%4d-%02d-%02dT%02d:%02d:%02dZ",
snprintf(timestamp_str, (size_t)n + 1, "%4d-%02d-%02dT%02d:%02d:%02dZ",
ret->tm_year + 1900, ret->tm_mon + 1, ret->tm_mday, ret->tm_hour, ret->tm_min, ret->tm_sec);
return timestamp_str;
}
......
......@@ -143,7 +143,7 @@ string DbSession::currentTimestamp () const {
char buffer[n + 1];
snprintf(
buffer,
n+1,
(size_t)n+1,
"'%d-%02d-%02d %02d:%02d:%02d'",
now.tm_year + 1900, now.tm_mon + 1, now.tm_mday, now.tm_hour, now.tm_min, now.tm_sec
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment