src/liboping.c: Start refactoring ping_send().
authorFlorian Forster <ff@octo.it>
Fri, 5 May 2017 08:07:19 +0000 (10:07 +0200)
committerFlorian Forster <ff@octo.it>
Fri, 5 May 2017 08:47:26 +0000 (10:47 +0200)
* Avoid the unnecessary copies of obj->head (ph), obj->fd4 (fd4) and
  obj->fd6 (fd6). Assigning these to local variables suggests that the
  decoupling is necessary, which is confusing when this is not really the
  case.
* Only scan for IPv4 and IPv6 hosts when resetting their latency and TTL
  and make sure appropriate sockets are open outside of the loop. This
  makes it easier to read and understand under which circumstances which
  socket is opened.
* Move some variables to inside the while loop.


No differences found