1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 14:11:29 +00:00
Files
nmap/osscan2.cc
dmiller e124565c58 Use time_t instead of long and double for storing uptime
Fixes #275.

This results in fewer casts and less subtraction than the previous
method, and should still be portable. Only division and subtraction and
difftime are performed on the value, so it will not overflow. And the
TCP timestamp itself is a 32-bit value, so it can't refer to a time
farther in the past than the 32-bit epoch. One explicit cast (to long
long) is used in order to ensure the format string can handle any
conceivable value according to the compiler and avoid a warning message.
2016-01-13 20:53:39 +00:00

116 KiB