unow is "unsigned long long", so use 1000000ULL instead of 1e+6
Signed-off-by: Vitezslav Samel <vitezslav(a)samel.cz>
---
src/hostmon.c | 2 +-
src/ifstats.c | 4 ++--
src/pktsize.c | 2 +-
src/serv.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/hostmon.c b/src/hostmon.c
index d61967d..fe00f28 100644
--- a/src/hostmon.c
+++ b/src/hostmon.c
@@ -788,7 +788,7 @@ void hostmon(const struct OPTIONS *options, int facilitytime, char
*ifptr,
do {
gettimeofday(&tv, NULL);
now = tv.tv_sec;
- unow = tv.tv_sec * 1e+6 + tv.tv_usec;
+ unow = tv.tv_sec * 1000000ULL + tv.tv_usec;
if ((now - starttime) >= 5) {
printelapsedtime(statbegin, now, LINES - 3, 15,
diff --git a/src/ifstats.c b/src/ifstats.c
index 2da2176..9997a34 100644
--- a/src/ifstats.c
+++ b/src/ifstats.c
@@ -491,7 +491,7 @@ void ifstats(const struct OPTIONS *options, struct filterstate
*ofilter,
while (!exitloop) {
gettimeofday(&tv, NULL);
now = tv.tv_sec;
- unow = tv.tv_sec * 1e+6 + tv.tv_usec;
+ unow = tv.tv_sec * 1000000ULL + tv.tv_usec;
if ((now - starttime) >= 5) {
updaterates(&table, options->actmode, starttime,
@@ -890,7 +890,7 @@ void detstats(char *iface, const struct OPTIONS *options, int
facilitytime,
while (!exitloop) {
gettimeofday(&tv, NULL);
now = tv.tv_sec;
- unow = tv.tv_sec * 1e+6 + tv.tv_usec;
+ unow = tv.tv_sec * 1000000ULL + tv.tv_usec;
rate_interval = now - starttime;
diff --git a/src/pktsize.c b/src/pktsize.c
index a1e747f..5bfbeaf 100644
--- a/src/pktsize.c
+++ b/src/pktsize.c
@@ -267,7 +267,7 @@ void packet_size_breakdown(struct OPTIONS *options, char *ifname,
do {
gettimeofday(&tv, NULL);
now = tv.tv_sec;
- unow = tv.tv_sec * 1e+6 + tv.tv_usec;
+ unow = tv.tv_sec * 1000000ULL + tv.tv_usec;
if (((options->updrate != 0)
&& (now - updtime >= options->updrate))
diff --git a/src/serv.c b/src/serv.c
index cdb7738..5ace560 100644
--- a/src/serv.c
+++ b/src/serv.c
@@ -831,7 +831,7 @@ void servmon(char *ifname, struct porttab *ports, const struct OPTIONS
*options,
while (!exitloop) {
gettimeofday(&tv, NULL);
now = tv.tv_sec;
- unow = tv.tv_sec * 1e+6 + tv.tv_usec;
+ unow = tv.tv_sec * 1000000ULL + tv.tv_usec;
if (now - timeint >= 5) {
printelapsedtime(starttime, now, LINES - 4, 20,
--
1.7.8.4