Skip to content

Commit

Permalink
tcptracer: linter cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
pchaigno committed Oct 7, 2017
1 parent 6d9b1b2 commit 7297af0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/tcptracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ def print_ipv4_event(cpu, data, size):
if args.verbose:
print("%-14d" % (event.ts_ns - start_ts), end="")
else:
print("%-9.3f" % ((float(event.ts_ns) - start_ts) / 1000000000), end="")
print("%-9.3f" % ((event.ts_ns - start_ts) / 1000000000.0), end="")
if event.type == 1:
type_str = "C"
elif event.type == 2:
Expand Down Expand Up @@ -604,7 +604,7 @@ def print_ipv6_event(cpu, data, size):
if args.verbose:
print("%-14d" % (event.ts_ns - start_ts), end="")
else:
print("%-9.3f" % ((float(event.ts_ns) - start_ts) / 1000000000), end="")
print("%-9.3f" % ((event.ts_ns - start_ts) / 1000000000.0), end="")
if event.type == 1:
type_str = "C"
elif event.type == 2:
Expand All @@ -622,8 +622,8 @@ def print_ipv6_event(cpu, data, size):
print("%-6d %-16s %-2d %-16s %-16s %-6d %-6d" %
(event.pid, event.comm.decode('utf-8'),
event.ip,
"["+inet_ntop(AF_INET6, event.saddr)+"]",
"["+inet_ntop(AF_INET6, event.daddr)+"]",
"[" + inet_ntop(AF_INET6, event.saddr) + "]",
"[" + inet_ntop(AF_INET6, event.daddr) + "]",
event.sport,
event.dport), end="")
if args.verbose and not args.netns:
Expand Down

0 comments on commit 7297af0

Please sign in to comment.