(((int)(set.max + incr) < set.max \
|| (((size_t)((int)(set.max + incr) * sizeof(set.data[0])) \
/ sizeof(set.data[0])) \
- != (set.max + incr))) \
+ != (size_t)(set.max + incr))) \
? 0 /* overflow */ \
: ((tmpptr = realloc(set.data, \
(int)(set.max + incr) * sizeof(set.data[0]))) \
}
krb5_error_code
-add_rpc_service(int port, u_long prognum, u_long versnum, void (*dispatch)())
+add_rpc_service(int port, u_long prognum, u_long versnum, void (*dispatchfn)())
{
int i;
void *tmp;
return EINVAL;
svc.prognum = prognum;
svc.versnum = versnum;
- svc.dispatch = dispatch;
+ svc.dispatch = dispatchfn;
FOREACH_ELT (rpc_svc_data, i, val) {
if (val.port == port)
saddrbuf, sportbuf, daddrbuf);
return;
}
- if (cc != response->length) {
+ if ((size_t)cc != response->length) {
com_err(prog, 0, "short reply write %d vs %d\n",
response->length, cc);
}
p = newconn->u.tcp.addrbuf;
end = p + sizeof(newconn->u.tcp.addrbuf);
p += strlen(p);
- if (end - p > 2 + strlen(tmpbuf)) {
+ if ((size_t)(end - p) > 2 + strlen(tmpbuf)) {
*p++ = '.';
strlcpy(p, tmpbuf, end - p);
}
}
while (nwrote) {
sg_buf *sgp = conn->u.tcp.sgp;
- if (nwrote < SG_LEN(sgp)) {
- SG_ADVANCE(sgp, nwrote);
+ if ((size_t)nwrote < SG_LEN(sgp)) {
+ SG_ADVANCE(sgp, (size_t)nwrote);
nwrote = 0;
} else {
nwrote -= SG_LEN(sgp);
p = newconn->u.tcp.addrbuf;
end = p + sizeof(newconn->u.tcp.addrbuf);
p += strlen(p);
- if (end - p > 2 + strlen(tmpbuf)) {
+ if ((size_t)(end - p) > 2 + strlen(tmpbuf)) {
*p++ = '.';
strlcpy(p, tmpbuf, end - p);
}