comparison src/lookup.c @ 366:41958685480d

Switched to `type *name' style Andrew Koenig's ``C Traps and Pitfalls'' (Ch.2.1) convinced me that it is best to go with the way C had been designed. The ``declaration reflects use'' concept conflicts with a ``type* name'' notation. Hence I switched.
author markus schnalke <meillo@marmaro.de>
date Thu, 22 Sep 2011 15:07:40 +0200
parents 996b53a50f55
children b27f66555ba8
comparison
equal deleted inserted replaced
365:934a223e4ee8 366:41958685480d
120 120
121 return 0; 121 return 0;
122 } 122 }
123 123
124 static int 124 static int
125 dns_getip(guint32 * ip) 125 dns_getip(guint32 *ip)
126 { 126 {
127 int ret; 127 int ret;
128 128
129 if ((ret = dns_next())) 129 if ((ret = dns_next()))
130 return ret; 130 return ret;
165 resp_pos += rr_dlen; 165 resp_pos += rr_dlen;
166 return 0; 166 return 0;
167 } 167 }
168 168
169 int 169 int
170 dns_look_ip(gchar * domain, guint32 * ip) 170 dns_look_ip(gchar *domain, guint32 *ip)
171 { 171 {
172 gchar *n = domain; 172 gchar *n = domain;
173 173
174 while (TRUE) { 174 while (TRUE) {
175 if (dns_resolve(n, T_A, FALSE) != 0) { 175 if (dns_resolve(n, T_A, FALSE) != 0) {
201 } 201 }
202 } 202 }
203 } 203 }
204 204
205 GList* 205 GList*
206 resolve_dns_a(GList * list, gchar * domain) 206 resolve_dns_a(GList *list, gchar *domain)
207 { 207 {
208 int ret; 208 int ret;
209 209
210 DEBUG(5) debugf("DNS: resolve_dns_a entered\n"); 210 DEBUG(5) debugf("DNS: resolve_dns_a entered\n");
211 211
233 else 233 else
234 return a->pref - b->pref; 234 return a->pref - b->pref;
235 } 235 }
236 236
237 GList* 237 GList*
238 resolve_dns_mx(GList * list, gchar * domain) 238 resolve_dns_mx(GList *list, gchar *domain)
239 { 239 {
240 GList *node; 240 GList *node;
241 int ret; 241 int ret;
242 int cnt = 0; 242 int cnt = 0;
243 243
284 #endif 284 #endif
285 285
286 /* now something completely different... */ 286 /* now something completely different... */
287 287
288 GList* 288 GList*
289 resolve_byname(GList * list, gchar * domain) 289 resolve_byname(GList *list, gchar *domain)
290 { 290 {
291 struct hostent *hent; 291 struct hostent *hent;
292 292
293 DEBUG(5) debugf("DNS: resolve_byname entered\n"); 293 DEBUG(5) debugf("DNS: resolve_byname entered\n");
294 294