mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-09-09 11:27:44 +02:00
review of services, daemon and testcode.
git-svn-id: file:///svn/unbound/trunk@70 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
@@ -86,6 +86,7 @@ add_opts(char* optarg, int* pass_argc, char* pass_argv[])
|
||||
else len = strlen(p);
|
||||
/* allocate and copy option */
|
||||
if(*pass_argc >= MAXARG-1) {
|
||||
/* printf because log_init is not yet called. */
|
||||
printf("too many arguments: '%s'\n", p);
|
||||
exit(1);
|
||||
}
|
||||
@@ -121,7 +122,8 @@ echo_cmdline(int argc, char* argv[])
|
||||
* @param argc: arg count.
|
||||
* @param argv: array of commandline arguments.
|
||||
*/
|
||||
int main(int argc, char* argv[])
|
||||
int
|
||||
main(int argc, char* argv[])
|
||||
{
|
||||
int c, res;
|
||||
int pass_argc = 0;
|
||||
|
||||
+5
-3
@@ -47,9 +47,10 @@ int testcount = 0;
|
||||
/** test bool x, exits on failure, increases testcount. */
|
||||
#define unit_assert(x) testcount++; log_assert(x);
|
||||
|
||||
/** test net code */
|
||||
#include "services/outside_network.h"
|
||||
static void net_test()
|
||||
/** test net code */
|
||||
static void
|
||||
net_test()
|
||||
{
|
||||
unit_assert( str_is_ip6("::") );
|
||||
unit_assert( str_is_ip6("::1") );
|
||||
@@ -66,7 +67,8 @@ static void net_test()
|
||||
* @param argc: arg count.
|
||||
* @param argv: array of commandline arguments.
|
||||
*/
|
||||
int main(int argc, char* argv[])
|
||||
int
|
||||
main(int argc, char* argv[])
|
||||
{
|
||||
if(argc != 1) {
|
||||
printf("usage: %s\n", argv[0]);
|
||||
|
||||
Reference in New Issue
Block a user