*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: irpmarshall.c,v 1.3.2.2 2004/03/17 00:40:12 marka Exp $";
+static const char rcsid[] = "$Id: irpmarshall.c,v 1.3.2.3 2004/03/17 01:15:47 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#if 0
/* gr_gid field */
tb = tmpbuf;
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
- strlen(tb) == 0) {
+ strlen(tb) == 0U) {
goto error;
}
t = strtol(tmpbuf, &tb, 10);
/* s_name field */
name = NULL;
- if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0) {
+ if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0U) {
goto error;
}
/* s_port field */
tb = tmpbuf;
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
- strlen(tb) == 0) {
+ strlen(tb) == 0U) {
goto error;
}
t = strtol(tmpbuf, &tb, 10);
/* p_name field */
name = NULL;
- if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0) {
+ if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0U) {
goto error;
}
/* p_proto field */
tb = tmpbuf;
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
- strlen(tb) == 0) {
+ strlen(tb) == 0U) {
goto error;
}
t = strtol(tmpbuf, &tb, 10);
/* h_name field */
name = NULL;
- if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0) {
+ if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0U) {
goto error;
}
/* h_addrtype field */
tb = tmpbuf;
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
- strlen(tb) == 0) {
+ strlen(tb) == 0U) {
goto error;
}
if (strcmp(tmpbuf, "AF_INET") == 0)
/* h_length field */
tb = tmpbuf;
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
- strlen(tb) == 0) {
+ strlen(tb) == 0U) {
goto error;
}
t = strtol(tmpbuf, &tb, 10);
/* n_name field */
name = NULL;
- if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0) {
+ if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0U) {
goto error;
}
/* h_addrtype field */
tb = tmpbuf;
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
- strlen(tb) == 0) {
+ strlen(tb) == 0U) {
goto error;
}
if (strcmp(tmpbuf, "AF_INET") == 0)
/* n_net field */
tb = tmpbuf;
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
- strlen(tb) == 0) {
+ strlen(tb) == 0U) {
goto error;
}
nnet = 0;
/* n_name field */
name = NULL;
- if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0) {
+ if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0U) {
goto error;
}
/* h_addrtype field */
tb = tmpbuf;
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
- strlen(tb) == 0) {
+ strlen(tb) == 0U) {
goto error;
}
if (strcmp(tmpbuf, "AF_INET") == 0)
/* n_net field */
tb = tmpbuf;
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
- strlen(tb) == 0) {
+ strlen(tb) == 0U) {
goto error;
}
bits = inet_net_pton(naddrtype, tmpbuf, &nnet, sizeof nnet);
static void
free_array(char **argv, size_t entries) {
char **p = argv;
- int useEntries = (entries > 0);
+ int useEntries = (entries > 0U);
if (argv == NULL)
return;
- while ((useEntries && entries > 0) || *p) {
+ while ((useEntries && entries > 0U) || *p) {
if (*p)
free(*p);
p++;
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: ctl_srvr.c,v 1.3.2.3 2004/03/17 00:40:14 marka Exp $";
+static const char rcsid[] = "$Id: ctl_srvr.c,v 1.3.2.4 2004/03/17 01:15:48 marka Exp $";
#endif /* not lint */
/*
me, address_expr);
goto untimely;
}
- if (sizeof "000-\r\n" + strlen(text) > MAX_LINELEN) {
+ if (sizeof "000-\r\n" + strlen(text) > (size_t)MAX_LINELEN) {
(*ctx->logger)(ctl_error, "%s: %s: output buffer ovf, closing",
me, address_expr);
goto untimely;
memmove(sess->inbuf.text, eos + 1, sess->inbuf.used);
return;
}
- if (sess->inbuf.used == MAX_LINELEN) {
+ if (sess->inbuf.used == (size_t)MAX_LINELEN) {
(*ctx->logger)(ctl_error, "%s: %s: line too long, closing",
me, address_expr);
ctl_close(sess);
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: ev_timers.c,v 1.2.2.3 2004/03/17 00:40:15 marka Exp $";
+static const char rcsid[] = "$Id: ev_timers.c,v 1.2.2.4 2004/03/17 01:15:48 marka Exp $";
#endif
/* Import. */
(long)due.tv_sec, due.tv_nsec,
(long)inter.tv_sec, inter.tv_nsec);
- if (due.tv_sec < 0 || due.tv_nsec > BILLION)
+ if (due.tv_sec < (time_t)0 || due.tv_nsec > BILLION)
EV_ERR(EINVAL);
- if (inter.tv_sec < 0 || inter.tv_nsec > BILLION)
+ if (inter.tv_sec < (time_t)0 || inter.tv_nsec > BILLION)
EV_ERR(EINVAL);
/* due={0,0} is a magic cookie meaning "now." */
if (heap_element(ctx->timers, timer->index) != timer)
EV_ERR(ENOENT);
- if (due.tv_sec < 0 || due.tv_nsec > BILLION)
+ if (due.tv_sec < (time_t)0 || due.tv_nsec > BILLION)
EV_ERR(EINVAL);
- if (inter.tv_sec < 0 || inter.tv_nsec > BILLION)
+ if (inter.tv_sec < (time_t)0 || inter.tv_nsec > BILLION)
EV_ERR(EINVAL);
old_due = timer->due;
*/
#ifndef lint
-static const char rcsid[] = "$Id: ns_print.c,v 1.3.2.4 2004/03/17 00:40:15 marka Exp $";
+static const char rcsid[] = "$Id: ns_print.c,v 1.3.2.5 2004/03/17 01:15:49 marka Exp $";
#endif
/* Import. */
*/
switch (type) {
case ns_t_a:
- if (rdlen != NS_INADDRSZ)
+ if (rdlen != (size_t)NS_INADDRSZ)
goto formerr;
(void) inet_ntop(AF_INET, rdata, buf, buflen);
addlen(strlen(buf), &buf, &buflen);
case ns_t_rt: {
u_int t;
- if (rdlen < NS_INT16SZ)
+ if (rdlen < (size_t)NS_INT16SZ)
goto formerr;
/* Priority. */
case ns_t_px: {
u_int t;
- if (rdlen < NS_INT16SZ)
+ if (rdlen < (size_t)NS_INT16SZ)
goto formerr;
/* Priority. */
}
case ns_t_aaaa:
- if (rdlen != NS_IN6ADDRSZ)
+ if (rdlen != (size_t)NS_IN6ADDRSZ)
goto formerr;
(void) inet_ntop(AF_INET6, rdata, buf, buflen);
addlen(strlen(buf), &buf, &buflen);