Quick style polishing...
This commit is contained in:
parent
de6f4cc900
commit
8683f5d4ee
@ -2,16 +2,21 @@
|
||||
#include <stdio.h>
|
||||
#include <net/if.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
struct if_nameindex *ifs;
|
||||
int i;
|
||||
struct if_nameindex* ifs;
|
||||
int i;
|
||||
|
||||
ifs = if_nameindex();
|
||||
if (ifs == NULL) { perror("if_nameindex"); exit(EXIT_FAILURE); }
|
||||
ifs = if_nameindex();
|
||||
if (ifs == NULL) {
|
||||
perror("if_nameindex");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
for (i = 0; ifs[i].if_index != 0 || ifs[i].if_name != NULL; i++) {
|
||||
printf("%d %s\n", ifs[i].if_index, ifs[i].if_name);
|
||||
}
|
||||
return EXIT_SUCCESS;
|
||||
for (i = 0; ifs[i].if_index != 0 || ifs[i].if_name != NULL; i++) {
|
||||
printf("%d %s\n", ifs[i].if_index, ifs[i].if_name);
|
||||
}
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user