OSDN Git Service

Fix ifaddrs#getifaddrs_INET flakiness.
authorElliott Hughes <enh@google.com>
Wed, 3 Feb 2016 15:42:33 +0000 (07:42 -0800)
committerElliott Hughes <enh@google.com>
Wed, 3 Feb 2016 15:42:33 +0000 (07:42 -0800)
commit2d5e21f00d20e72951cc583a1eab0fd9d415594e
treeeccf608405f6f7b3bcc35ab7825a4e966b620a45
parent3e75110bcb1d7b941ab0633e7e5c36c604512ded
Fix ifaddrs#getifaddrs_INET flakiness.

The interface name wasn't being nul-terminated for the ioctl. Also clean up
the code a bit to give more useful diagnostics on failure.

Bug: http://b/26887941
Change-Id: I30c6bdc1a32733971a27ed1fb7db9d8239b6262b
tests/ifaddrs_test.cpp