};
\f
-#define SET(TYPE) struct { TYPE *data; int n, max; }
+#define SET(TYPE) struct { TYPE *data; size_t n, max; }
/* Start at the top and work down -- this should allow for deletions
without disrupting the iteration, since we delete by overwriting
for (idx = set.n-1; idx >= 0 && (vvar = set.data[idx], 1); idx--)
#define GROW_SET(set, incr, tmpptr) \
- (((int)(set.max + incr) < set.max \
- || (((size_t)((int)(set.max + incr) * sizeof(set.data[0])) \
- / sizeof(set.data[0])) \
- != (size_t)(set.max + incr))) \
- ? 0 /* overflow */ \
+ ((set.max + incr < set.max \
+ || ((set.max + incr) * sizeof(set.data[0]) / sizeof(set.data[0]) \
+ != set.max + incr)) \
+ ? 0 /* overflow */ \
: ((tmpptr = realloc(set.data, \
- (int)(set.max + incr) * sizeof(set.data[0]))) \
+ (set.max + incr) * sizeof(set.data[0]))) \
? (set.data = tmpptr, set.max += incr, 1) \
: 0))
}
setup_tcp_listener_ports(&setup_data);
setup_rpc_listener_ports(&setup_data);
- krb5_klog_syslog (LOG_INFO, "set up %d sockets", n_sockets);
+ krb5_klog_syslog (LOG_INFO, "set up %d sockets", (int)n_sockets);
if (n_sockets == 0) {
com_err(prog, 0, "no sockets set up?");
exit (1);
can be rather large. Making this static avoids putting all
that junk on the stack. */
static struct select_state sout;
- int i, sret, netchanged = 0;
+ size_t i;
+ int sret, netchanged = 0;
krb5_error_code err;
if (conns == (struct connection **) NULL)