fix if_nametoindex return value when interface does not exist
authorRich Felker <dalias@aerifal.cx>
Tue, 3 Jun 2014 21:53:11 +0000 (17:53 -0400)
committerRich Felker <dalias@aerifal.cx>
Tue, 3 Jun 2014 21:53:11 +0000 (17:53 -0400)
commit8041af59881219c32267c3491bee43591d3c3fe6
treec7dbb1381b84ef53612225441506dba5350de221
parentd85d261ee601f7ccf0bb19c38c69e406a664fe8e
fix if_nametoindex return value when interface does not exist

the return value is unsigned, so negative results for "errors" do not
make sense; 0 is the value reserved for when the interface name does
not exist.
src/network/if_nametoindex.c