Commit 30ec003d authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

Change VTCP_Check() to take a ssize_t

Since the input value is sometimes the result of a read()/write() call,
avoid truncating the ssize_t value on calling it.
parent f8a8b362
......@@ -37,7 +37,7 @@ struct suckaddr;
#define VTCP_ADDRBUFSIZE 64
#define VTCP_PORTBUFSIZE 16
int VTCP_Check(int a);
int VTCP_Check(ssize_t a);
#define VTCP_Assert(a) assert(VTCP_Check(a))
struct suckaddr *VTCP_my_suckaddr(int sock);
......
......@@ -558,7 +558,7 @@ VTCP_check_hup(int sock)
*/
int
VTCP_Check(int a)
VTCP_Check(ssize_t a)
{
if (a == 0)
return (1);
......
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