* Callback function to display address.
*/
static void
-printer (void *cls,
- const struct sockaddr * addr,
- socklen_t addrlen)
+printer (void *cls, const struct sockaddr *addr, socklen_t addrlen)
{
if (addr == NULL)
return;
- FPRINTF (stdout,
- "%s\n",
- GNUNET_a2s (addr, addrlen));
+ FPRINTF (stdout, "%s\n", GNUNET_a2s (addr, addrlen));
}
* @param cfg configuration
*/
static void
-run (void *cls,
- char *const *args,
- const char *cfgfile,
+run (void *cls, char *const *args, const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
if (args[0] == NULL)
return;
- GNUNET_RESOLVER_ip_get (cfg,
- args[0],
- AF_UNSPEC,
- GET_TIMEOUT,
- &printer,
- NULL);
+ GNUNET_RESOLVER_ip_get (args[0], AF_UNSPEC, GET_TIMEOUT, &printer, NULL);
}
/**
GNUNET_GETOPT_OPTION_END
};
return (GNUNET_OK ==
- GNUNET_PROGRAM_run (argc,
- argv,
- "gnunet-resolver [hostname]",
- gettext_noop
- ("Test GNUnet DNS resolver code."),
+ GNUNET_PROGRAM_run (argc, argv, "gnunet-resolver [hostname]",
+ gettext_noop ("Test GNUnet DNS resolver code."),
options, &run, NULL)) ? 0 : 1;
}