[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r27246 - gnunet/src/hostlist
From: |
gnunet |
Subject: |
[GNUnet-SVN] r27246 - gnunet/src/hostlist |
Date: |
Wed, 22 May 2013 12:25:45 +0200 |
Author: grothoff
Date: 2013-05-22 12:25:45 +0200 (Wed, 22 May 2013)
New Revision: 27246
Modified:
gnunet/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c
Log:
-simplify
Modified: gnunet/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c
===================================================================
--- gnunet/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c 2013-05-22
10:25:34 UTC (rev 27245)
+++ gnunet/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c 2013-05-22
10:25:45 UTC (rev 27246)
@@ -198,38 +198,29 @@
}
-static int
-check ()
+int
+main (int argc, char *argv[])
{
- char *const argv[] = { "test-gnunet-daemon-hostlist",
+ static char *const argv[] = {
+ "test-gnunet-daemon-hostlist",
"-c", "test_gnunet_daemon_hostlist_data.conf",
NULL
};
- struct GNUNET_GETOPT_CommandLineOption options[] = {
+ static struct GNUNET_GETOPT_CommandLineOption options[] = {
GNUNET_GETOPT_OPTION_END
};
- ok = 1;
- GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv,
- "test-gnunet-daemon-hostlist", "nohelp", options, &run,
- &ok);
- return ok;
-}
-
-int
-main (int argc, char *argv[])
-{
-
- int ret;
-
GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-1");
GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-2");
GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-3");
GNUNET_log_setup ("test-gnunet-daemon-hostlist",
"WARNING",
NULL);
- ret = check ();
- if (ret == 0)
+ ok = 1;
+ GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv,
+ "test-gnunet-daemon-hostlist", "nohelp", options, &run,
+ &ok);
+ if (0 == ok)
{
FPRINTF (stderr, "%s", ".");
/* now do it again */
@@ -239,7 +230,7 @@
GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-1");
GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-2");
GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-3");
- return ret;
+ return ok;
}
/* end of test_gnunet_daemon_hostlist_reconnect.c */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r27246 - gnunet/src/hostlist,
gnunet <=