--- sa.c 2002/01/27 20:43:21 1.53
+++ sa.c 2002/01/29 12:48:28 1.54
@@ -143,14 +143,14 @@
do { \
(sa)->scSysCall.sc_##fn.fptr.any = (void (*)())(ptr); \
(sa)->scSysCall.sc_##fn.fctx = (ctx); \
- } while(0)
+ } while (0)
/* system call structure assignment macro */
#define SA_SC_COPY(sa1, sa2, fn) \
do { \
(sa1)->scSysCall.sc_##fn.fptr.any = (sa2)->scSysCall.sc_##fn.fptr.any; \
(sa1)->scSysCall.sc_##fn.fctx = (sa2)->scSysCall.sc_##fn.fctx; \
- } while(0)
+ } while (0)
/* system call function call macros */
#define SA_SC_CALL_0(sa, fn) \
@@ -449,7 +449,7 @@
char *cpHost;
char *cpPort;
char *cpProto;
- int nPort;
+ unsigned int nPort;
const char *cpPath;
char uribuf[1024];
char *cp;
@@ -545,7 +545,7 @@
}
}
if (bNumeric)
- nPort = atoi(cpPort);
+ nPort = (unsigned int)atoi(cpPort);
else {
if ((se = getservbyname(cpPort, cpProto)) == NULL)
return SA_ERR_SYS;
@@ -658,7 +658,7 @@
struct sockaddr_in6 *sa6;
#endif
char caHost[512];
- int nPort;
+ unsigned int nPort;
/* argument sanity check(s) */
if (saa == NULL || uri == NULL)
@@ -1596,7 +1596,7 @@
{
int n;
sa_rc_t rv;
- size_t res;
+ int res;
/* argument sanity check(s) */
if (sa == NULL || cpBuf == NULL || nBufReq == 0)
@@ -1627,7 +1627,7 @@
else {
/* user-space buffered I/O */
res = 0;
- while (1) {
+ for (;;) {
if (nBufReq <= sa->nReadLen) {
/* buffer holds enough data, so just use this */
memmove(cpBuf, sa->cpReadBuf, nBufReq);
@@ -1682,7 +1682,7 @@
/* pass number of actually read bytes to caller */
if (nBufRes != NULL)
- *nBufRes = res;
+ *nBufRes = (size_t)res;
return rv;
}
@@ -1773,8 +1773,8 @@
/* write data to socket */
sa_rc_t sa_write(sa_t *sa, const char *cpBuf, size_t nBufReq, size_t *nBufRes)
{
- size_t n;
- size_t res;
+ int n;
+ int res;
sa_rc_t rv;
/* argument sanity check(s) */
@@ -1830,7 +1830,7 @@
/* pass number of actually written bytes to caller */
if (nBufRes != NULL)
- *nBufRes = res;
+ *nBufRes = (size_t)res;
return rv;
}
@@ -1884,7 +1884,7 @@
/* flush write/outgoing I/O buffer */
sa_rc_t sa_flush(sa_t *sa)
{
- size_t n;
+ int n;
sa_rc_t rv;
/* argument sanity check(s) */
|