diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2016-09-25 13:54:01 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2016-09-25 13:54:01 +0000 |
commit | b06bfafcb7b3a984a6ce8aca62bdc39cb44c7622 (patch) | |
tree | 1727ab1628d00e4e667340da27e061aa9f2345a4 | |
parent | 455d2325f41e21243fa2f7e446fd8071698f97db (diff) |
Interval calculations are perfectly fine with ints.
OK jca@
-rw-r--r-- | usr.sbin/rtadvd/config.c | 6 | ||||
-rw-r--r-- | usr.sbin/rtadvd/rtadvd.h | 7 |
2 files changed, 6 insertions, 7 deletions
diff --git a/usr.sbin/rtadvd/config.c b/usr.sbin/rtadvd/config.c index 4f94632c1b6..87fc784aa6d 100644 --- a/usr.sbin/rtadvd/config.c +++ b/usr.sbin/rtadvd/config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: config.c,v 1.58 2016/08/02 17:00:09 jca Exp $ */ +/* $OpenBSD: config.c,v 1.59 2016/09/25 13:54:00 florian Exp $ */ /* $KAME: config.c,v 1.62 2002/05/29 10:13:10 itojun Exp $ */ /* @@ -148,7 +148,7 @@ getconfig(char *intface) MAYHAVE(val, "maxinterval", DEF_MAXRTRADVINTERVAL); if (val < MIN_MAXINTERVAL || val > MAX_MAXINTERVAL) { log_warnx("maxinterval (%ld) on %s is invalid " - "(must be between %e and %u)", val, + "(must be between %u and %u)", val, intface, MIN_MAXINTERVAL, MAX_MAXINTERVAL); exit(1); } @@ -156,7 +156,7 @@ getconfig(char *intface) MAYHAVE(val, "mininterval", tmp->maxinterval/3); if (val < MIN_MININTERVAL || val > (tmp->maxinterval * 3) / 4) { log_warnx("mininterval (%ld) on %s is invalid " - "(must be between %e and %d)", + "(must be between %u and %u)", val, intface, MIN_MININTERVAL, (tmp->maxinterval * 3) / 4); exit(1); } diff --git a/usr.sbin/rtadvd/rtadvd.h b/usr.sbin/rtadvd/rtadvd.h index 3dcd89e51bc..69d90b94f4e 100644 --- a/usr.sbin/rtadvd/rtadvd.h +++ b/usr.sbin/rtadvd/rtadvd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rtadvd.h,v 1.27 2016/08/20 15:05:52 jca Exp $ */ +/* $OpenBSD: rtadvd.h,v 1.28 2016/09/25 13:54:00 florian Exp $ */ /* $KAME: rtadvd.h,v 1.20 2002/05/29 10:13:10 itojun Exp $ */ /* @@ -44,11 +44,10 @@ #define DEF_ADVVALIDLIFETIME 2592000 #define DEF_ADVPREFERREDLIFETIME 604800 -/* XXX int-to-double comparison for INTERVAL items */ #define MAXROUTERLIFETIME 9000 -#define MIN_MAXINTERVAL 4.0 +#define MIN_MAXINTERVAL 4 #define MAX_MAXINTERVAL 1800 -#define MIN_MININTERVAL 3.0 +#define MIN_MININTERVAL 3 #define MAXREACHABLETIME 3600000 #define MAX_INITIAL_RTR_ADVERT_INTERVAL 16 |