rtadvd: no need for float defines

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

rtadvd: no need for float defines

Florian Obser-2
OK?

diff --git config.c config.c
index 4f94632..842f9af 100644
--- config.c
+++ config.c
@@ -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 rtadvd.h rtadvd.h
index 3dcd89e..fea0fd8 100644
--- rtadvd.h
+++ rtadvd.h
@@ -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

--
I'm not entirely sure you are real.

Reply | Threaded
Open this post in threaded view
|

Re: rtadvd: no need for float defines

Jeremie Courreges-Anglas-2
Florian Obser <[hidden email]> writes:

> OK?

ok jca@, I don't think that the opposite direction (fully handling those
values as floats) is worth the trouble.

--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE