diff options
Diffstat (limited to 'src/gns/w32nsp-resolve.c')
-rw-r--r-- | src/gns/w32nsp-resolve.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/gns/w32nsp-resolve.c b/src/gns/w32nsp-resolve.c index 4a116f594..3234a1ee5 100644 --- a/src/gns/w32nsp-resolve.c +++ b/src/gns/w32nsp-resolve.c | |||
@@ -57,7 +57,8 @@ DEFINE_GUID(SVCID_INET_HOSTADDRBYNAME, 0x0002a803, 0x0000, 0x0000, 0xc0, 0x00, 0 | |||
57 | // to convert structures returned as BLOBs. | 57 | // to convert structures returned as BLOBs. |
58 | // | 58 | // |
59 | 59 | ||
60 | VOID FixList(PCHAR ** List, PCHAR Base) | 60 | VOID |
61 | FixList(PCHAR ** List, PCHAR Base) | ||
61 | { | 62 | { |
62 | if(*List) | 63 | if(*List) |
63 | { | 64 | { |
@@ -77,7 +78,8 @@ VOID FixList(PCHAR ** List, PCHAR Base) | |||
77 | // Routine to convert a hostent returned in a BLOB to one with | 78 | // Routine to convert a hostent returned in a BLOB to one with |
78 | // usable pointers. The structure is converted in-place. | 79 | // usable pointers. The structure is converted in-place. |
79 | // | 80 | // |
80 | VOID UnpackHostEnt(struct hostent * hostent) | 81 | VOID |
82 | UnpackHostEnt(struct hostent * hostent) | ||
81 | { | 83 | { |
82 | PCHAR pch; | 84 | PCHAR pch; |
83 | 85 | ||
@@ -91,13 +93,15 @@ VOID UnpackHostEnt(struct hostent * hostent) | |||
91 | FixList(&hostent->h_addr_list, pch); | 93 | FixList(&hostent->h_addr_list, pch); |
92 | } | 94 | } |
93 | 95 | ||
94 | void | 96 | |
97 | static void | ||
95 | print_hostent (struct hostent *he) | 98 | print_hostent (struct hostent *he) |
96 | { | 99 | { |
97 | int i; | 100 | int i; |
98 | char **pAlias; | 101 | char **pAlias; |
102 | |||
99 | printf("\tOfficial name: %s\n", he->h_name); | 103 | printf("\tOfficial name: %s\n", he->h_name); |
100 | for (pAlias = he->h_aliases; *pAlias != 0; pAlias++) { | 104 | for (i=0, pAlias = he->h_aliases; *pAlias != 0; pAlias++) { |
101 | printf("\tAlternate name #%d: %s\n", ++i, *pAlias); | 105 | printf("\tAlternate name #%d: %s\n", ++i, *pAlias); |
102 | } | 106 | } |
103 | printf("\tAddress type: "); | 107 | printf("\tAddress type: "); |
@@ -150,6 +154,7 @@ print_hostent (struct hostent *he) | |||
150 | } | 154 | } |
151 | } | 155 | } |
152 | 156 | ||
157 | |||
153 | int | 158 | int |
154 | main (int argc, char **argv) | 159 | main (int argc, char **argv) |
155 | { | 160 | { |