Skip to content
Snippets Groups Projects
Commit 555da2df authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Oh damn, this is an off_t + size_t + 1... talk about the wild west of types!

Both long long and long are reasonable for some mixes of platforms.

Just punt, cast the whole thing to int64_t, and forget about it.
parent 90cf94ba
Branches
Tags
1 merge request!455Update branch with changes from master
......@@ -3204,8 +3204,8 @@ static bool smtp_client_thread(smtp_t* smtp)
safe_snprintf(str,sizeof(str),"%s%s%s",head,sender_addr,tail);
if((telegram_buf=(char*)malloc((size_t)(length+strlen(str)+1)))==NULL) {
lprintf(LOG_CRIT,"%04d %s %s !ERROR allocating %" XP_PRIsize_t "u bytes of memory for telegram from %s"
,socket, client.protocol, client_id, length+strlen(str)+1,sender_addr);
lprintf(LOG_CRIT,"%04d %s %s !ERROR allocating %" PRIu64 " bytes of memory for telegram from %s"
,socket, client.protocol, client_id, (uint64_t)(length+strlen(str)+1),sender_addr);
sockprintf(socket,client.protocol,session, insuf_stor);
continue;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment