mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-14 09:40:20 +00:00
Fix a few cppcheck warnings.
Use the proper data type in format functions and fix a resource leak.
This commit is contained in:
@@ -322,7 +322,7 @@ ignore_save ()
|
||||
ig = (struct ignore *) temp->data;
|
||||
if (!(ig->type & IG_NOSAVE))
|
||||
{
|
||||
snprintf (buf, sizeof (buf), "mask = %s\ntype = %d\n\n",
|
||||
snprintf (buf, sizeof (buf), "mask = %s\ntype = %u\n\n",
|
||||
ig->mask, ig->type);
|
||||
write (fh, buf, strlen (buf));
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ send_msprequest(s, state, request, end)
|
||||
|
||||
if ((w = send(s, request, l, 0)) != l) {
|
||||
#ifdef DEBUG_MSPROXY
|
||||
printf ("send_msprequest(): send() failed (%d bytes sent instead of %d\n", w, l);
|
||||
printf ("send_msprequest(): send() failed (%ld bytes sent instead of %Iu\n", w, l);
|
||||
perror ("Error is");
|
||||
#endif
|
||||
return -1;
|
||||
@@ -93,7 +93,7 @@ recv_mspresponse(s, state, response)
|
||||
do {
|
||||
if ((r = recv (s, response, sizeof (*response), 0)) < MSPROXY_MINLENGTH) {
|
||||
#ifdef DEBUG_MSPROXY
|
||||
printf ("recv_mspresponse(): expected to read atleast %d, read %d\n", MSPROXY_MINLENGTH, r);
|
||||
printf ("recv_mspresponse(): expected to read atleast %d, read %ld\n", MSPROXY_MINLENGTH, r);
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user