diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/common_logging.c | 2 | ||||
-rw-r--r-- | src/util/configuration.c | 6 | ||||
-rw-r--r-- | src/util/crypto_random.c | 2 | ||||
-rw-r--r-- | src/util/getopt.c | 28 | ||||
-rw-r--r-- | src/util/getopt_helpers.c | 4 | ||||
-rw-r--r-- | src/util/plugin.c | 2 | ||||
-rw-r--r-- | src/util/test_common_allocation.c | 2 | ||||
-rw-r--r-- | src/util/test_common_logging.c | 8 | ||||
-rw-r--r-- | src/util/test_common_logging_dummy.c | 2 | ||||
-rw-r--r-- | src/util/test_common_logging_runtime_loglevels.c | 6 | ||||
-rw-r--r-- | src/util/test_configuration.c | 12 | ||||
-rw-r--r-- | src/util/test_crypto_aes_weak.c | 2 | ||||
-rw-r--r-- | src/util/test_crypto_ksk.c | 30 | ||||
-rw-r--r-- | src/util/test_crypto_random.c | 2 | ||||
-rw-r--r-- | src/util/test_crypto_rsa.c | 34 | ||||
-rw-r--r-- | src/util/test_disk.c | 10 | ||||
-rw-r--r-- | src/util/test_os_start_process.c | 4 | ||||
-rw-r--r-- | src/util/test_peer.c | 4 | ||||
-rw-r--r-- | src/util/test_resolver_api.c | 6 | ||||
-rw-r--r-- | src/util/test_scheduler_delay.c | 12 | ||||
-rw-r--r-- | src/util/test_service.c | 2 | ||||
-rw-r--r-- | src/util/test_strings.c | 2 |
22 files changed, 91 insertions, 91 deletions
diff --git a/src/util/common_logging.c b/src/util/common_logging.c index c358e6fd8..72a2c67da 100644 --- a/src/util/common_logging.c +++ b/src/util/common_logging.c | |||
@@ -680,7 +680,7 @@ output_message (enum GNUNET_ErrorType kind, const char *comp, | |||
680 | 680 | ||
681 | if (GNUNET_stderr != NULL) | 681 | if (GNUNET_stderr != NULL) |
682 | { | 682 | { |
683 | fprintf (GNUNET_stderr, "%s %s %s %s", datestr, comp, | 683 | FPRINTF (GNUNET_stderr, "%s %s %s %s", datestr, comp, |
684 | GNUNET_error_type_to_string (kind), msg); | 684 | GNUNET_error_type_to_string (kind), msg); |
685 | fflush (GNUNET_stderr); | 685 | fflush (GNUNET_stderr); |
686 | } | 686 | } |
diff --git a/src/util/configuration.c b/src/util/configuration.c index 41a4e1975..eb86d0496 100644 --- a/src/util/configuration.c +++ b/src/util/configuration.c | |||
@@ -309,7 +309,7 @@ GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
309 | sec = cfg->sections; | 309 | sec = cfg->sections; |
310 | while (sec != NULL) | 310 | while (sec != NULL) |
311 | { | 311 | { |
312 | if (0 > fprintf (fp, "[%s]\n", sec->name)) | 312 | if (0 > FPRINTF (fp, "[%s]\n", sec->name)) |
313 | { | 313 | { |
314 | error = 1; | 314 | error = 1; |
315 | break; | 315 | break; |
@@ -327,7 +327,7 @@ GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
327 | pos[0] = '\\'; | 327 | pos[0] = '\\'; |
328 | pos[1] = 'n'; | 328 | pos[1] = 'n'; |
329 | } | 329 | } |
330 | if (0 > fprintf (fp, "%s = %s\n", ent->key, val)) | 330 | if (0 > FPRINTF (fp, "%s = %s\n", ent->key, val)) |
331 | { | 331 | { |
332 | error = 1; | 332 | error = 1; |
333 | GNUNET_free (val); | 333 | GNUNET_free (val); |
@@ -339,7 +339,7 @@ GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
339 | } | 339 | } |
340 | if (error != 0) | 340 | if (error != 0) |
341 | break; | 341 | break; |
342 | if (0 > fprintf (fp, "\n")) | 342 | if (0 > FPRINTF (fp, "%s\n", "")) |
343 | { | 343 | { |
344 | error = 1; | 344 | error = 1; |
345 | break; | 345 | break; |
diff --git a/src/util/crypto_random.c b/src/util/crypto_random.c index ff20646f7..121dbef9a 100644 --- a/src/util/crypto_random.c +++ b/src/util/crypto_random.c | |||
@@ -303,7 +303,7 @@ void __attribute__ ((constructor)) GNUNET_CRYPTO_random_init () | |||
303 | gcry_control (GCRYCTL_DISABLE_SECMEM, 0); | 303 | gcry_control (GCRYCTL_DISABLE_SECMEM, 0); |
304 | if (!gcry_check_version (GCRYPT_VERSION)) | 304 | if (!gcry_check_version (GCRYPT_VERSION)) |
305 | { | 305 | { |
306 | fprintf (stderr, | 306 | FPRINTF (stderr, |
307 | _ | 307 | _ |
308 | ("libgcrypt has not the expected version (version %s is required).\n"), | 308 | ("libgcrypt has not the expected version (version %s is required).\n"), |
309 | GCRYPT_VERSION); | 309 | GCRYPT_VERSION); |
diff --git a/src/util/getopt.c b/src/util/getopt.c index 08c133423..169949821 100644 --- a/src/util/getopt.c +++ b/src/util/getopt.c | |||
@@ -669,7 +669,7 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
669 | if (ambig && !exact) | 669 | if (ambig && !exact) |
670 | { | 670 | { |
671 | if (GNopterr) | 671 | if (GNopterr) |
672 | fprintf (stderr, _("%s: option `%s' is ambiguous\n"), argv[0], | 672 | FPRINTF (stderr, _("%s: option `%s' is ambiguous\n"), argv[0], |
673 | argv[GNoptind]); | 673 | argv[GNoptind]); |
674 | nextchar += strlen (nextchar); | 674 | nextchar += strlen (nextchar); |
675 | GNoptind++; | 675 | GNoptind++; |
@@ -692,12 +692,12 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
692 | { | 692 | { |
693 | if (argv[GNoptind - 1][1] == '-') | 693 | if (argv[GNoptind - 1][1] == '-') |
694 | /* --option */ | 694 | /* --option */ |
695 | fprintf (stderr, | 695 | FPRINTF (stderr, |
696 | _("%s: option `--%s' does not allow an argument\n"), | 696 | _("%s: option `--%s' does not allow an argument\n"), |
697 | argv[0], pfound->name); | 697 | argv[0], pfound->name); |
698 | else | 698 | else |
699 | /* +option or -option */ | 699 | /* +option or -option */ |
700 | fprintf (stderr, | 700 | FPRINTF (stderr, |
701 | _("%s: option `%c%s' does not allow an argument\n"), | 701 | _("%s: option `%c%s' does not allow an argument\n"), |
702 | argv[0], argv[GNoptind - 1][0], pfound->name); | 702 | argv[0], argv[GNoptind - 1][0], pfound->name); |
703 | } | 703 | } |
@@ -715,7 +715,7 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
715 | { | 715 | { |
716 | if (GNopterr) | 716 | if (GNopterr) |
717 | { | 717 | { |
718 | fprintf (stderr, _("%s: option `%s' requires an argument\n"), | 718 | FPRINTF (stderr, _("%s: option `%s' requires an argument\n"), |
719 | argv[0], argv[GNoptind - 1]); | 719 | argv[0], argv[GNoptind - 1]); |
720 | } | 720 | } |
721 | nextchar += strlen (nextchar); | 721 | nextchar += strlen (nextchar); |
@@ -744,11 +744,11 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
744 | { | 744 | { |
745 | if (argv[GNoptind][1] == '-') | 745 | if (argv[GNoptind][1] == '-') |
746 | /* --option */ | 746 | /* --option */ |
747 | fprintf (stderr, _("%s: unrecognized option `--%s'\n"), argv[0], | 747 | FPRINTF (stderr, _("%s: unrecognized option `--%s'\n"), argv[0], |
748 | nextchar); | 748 | nextchar); |
749 | else | 749 | else |
750 | /* +option or -option */ | 750 | /* +option or -option */ |
751 | fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), argv[0], | 751 | FPRINTF (stderr, _("%s: unrecognized option `%c%s'\n"), argv[0], |
752 | argv[GNoptind][0], nextchar); | 752 | argv[GNoptind][0], nextchar); |
753 | } | 753 | } |
754 | nextchar = (char *) ""; | 754 | nextchar = (char *) ""; |
@@ -773,9 +773,9 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
773 | { | 773 | { |
774 | if (posixly_correct) | 774 | if (posixly_correct) |
775 | /* 1003.2 specifies the format of this message. */ | 775 | /* 1003.2 specifies the format of this message. */ |
776 | fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c); | 776 | FPRINTF (stderr, _("%s: illegal option -- %c\n"), argv[0], c); |
777 | else | 777 | else |
778 | fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c); | 778 | FPRINTF (stderr, _("%s: invalid option -- %c\n"), argv[0], c); |
779 | } | 779 | } |
780 | return '?'; | 780 | return '?'; |
781 | } | 781 | } |
@@ -803,7 +803,7 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
803 | if (GNopterr) | 803 | if (GNopterr) |
804 | { | 804 | { |
805 | /* 1003.2 specifies the format of this message. */ | 805 | /* 1003.2 specifies the format of this message. */ |
806 | fprintf (stderr, _("%s: option requires an argument -- %c\n"), | 806 | FPRINTF (stderr, _("%s: option requires an argument -- %c\n"), |
807 | argv[0], c); | 807 | argv[0], c); |
808 | } | 808 | } |
809 | if (optstring[0] == ':') | 809 | if (optstring[0] == ':') |
@@ -851,7 +851,7 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
851 | if (ambig && !exact) | 851 | if (ambig && !exact) |
852 | { | 852 | { |
853 | if (GNopterr) | 853 | if (GNopterr) |
854 | fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), argv[0], | 854 | FPRINTF (stderr, _("%s: option `-W %s' is ambiguous\n"), argv[0], |
855 | argv[GNoptind]); | 855 | argv[GNoptind]); |
856 | nextchar += strlen (nextchar); | 856 | nextchar += strlen (nextchar); |
857 | GNoptind++; | 857 | GNoptind++; |
@@ -869,7 +869,7 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
869 | else | 869 | else |
870 | { | 870 | { |
871 | if (GNopterr) | 871 | if (GNopterr) |
872 | fprintf (stderr, _("\ | 872 | FPRINTF (stderr, _("\ |
873 | %s: option `-W %s' does not allow an argument\n"), argv[0], pfound->name); | 873 | %s: option `-W %s' does not allow an argument\n"), argv[0], pfound->name); |
874 | 874 | ||
875 | nextchar += strlen (nextchar); | 875 | nextchar += strlen (nextchar); |
@@ -883,7 +883,7 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
883 | else | 883 | else |
884 | { | 884 | { |
885 | if (GNopterr) | 885 | if (GNopterr) |
886 | fprintf (stderr, _("%s: option `%s' requires an argument\n"), | 886 | FPRINTF (stderr, _("%s: option `%s' requires an argument\n"), |
887 | argv[0], argv[GNoptind - 1]); | 887 | argv[0], argv[GNoptind - 1]); |
888 | nextchar += strlen (nextchar); | 888 | nextchar += strlen (nextchar); |
889 | return optstring[0] == ':' ? ':' : '?'; | 889 | return optstring[0] == ':' ? ':' : '?'; |
@@ -931,7 +931,7 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
931 | if (GNopterr) | 931 | if (GNopterr) |
932 | { | 932 | { |
933 | /* 1003.2 specifies the format of this message. */ | 933 | /* 1003.2 specifies the format of this message. */ |
934 | fprintf (stderr, _("%s: option requires an argument -- %c\n"), | 934 | FPRINTF (stderr, _("%s: option requires an argument -- %c\n"), |
935 | argv[0], c); | 935 | argv[0], c); |
936 | } | 936 | } |
937 | if (optstring[0] == ':') | 937 | if (optstring[0] == ':') |
@@ -1035,7 +1035,7 @@ GNUNET_GETOPT_run (const char *binaryOptions, | |||
1035 | } | 1035 | } |
1036 | if (i == count) | 1036 | if (i == count) |
1037 | { | 1037 | { |
1038 | fprintf (stderr, _("Use --help to get a list of options.\n")); | 1038 | FPRINTF (stderr, _("Use %s to get a list of options.\n"), "--help"); |
1039 | cont = GNUNET_SYSERR; | 1039 | cont = GNUNET_SYSERR; |
1040 | } | 1040 | } |
1041 | } | 1041 | } |
diff --git a/src/util/getopt_helpers.c b/src/util/getopt_helpers.c index c74b90877..8fb3673c0 100644 --- a/src/util/getopt_helpers.c +++ b/src/util/getopt_helpers.c | |||
@@ -252,7 +252,7 @@ GNUNET_GETOPT_set_ulong (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | |||
252 | 252 | ||
253 | if (1 != SSCANF (value, "%llu", val)) | 253 | if (1 != SSCANF (value, "%llu", val)) |
254 | { | 254 | { |
255 | fprintf (stderr, _("You must pass a number to the `%s' option.\n"), option); | 255 | FPRINTF (stderr, _("You must pass a number to the `%s' option.\n"), option); |
256 | return GNUNET_SYSERR; | 256 | return GNUNET_SYSERR; |
257 | } | 257 | } |
258 | return GNUNET_OK; | 258 | return GNUNET_OK; |
@@ -280,7 +280,7 @@ GNUNET_GETOPT_set_uint (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | |||
280 | 280 | ||
281 | if (1 != SSCANF (value, "%u", val)) | 281 | if (1 != SSCANF (value, "%u", val)) |
282 | { | 282 | { |
283 | fprintf (stderr, _("You must pass a number to the `%s' option.\n"), option); | 283 | FPRINTF (stderr, _("You must pass a number to the `%s' option.\n"), option); |
284 | return GNUNET_SYSERR; | 284 | return GNUNET_SYSERR; |
285 | } | 285 | } |
286 | return GNUNET_OK; | 286 | return GNUNET_OK; |
diff --git a/src/util/plugin.c b/src/util/plugin.c index fe5fb87f9..4e0385a09 100644 --- a/src/util/plugin.c +++ b/src/util/plugin.c | |||
@@ -86,7 +86,7 @@ plugin_init () | |||
86 | err = lt_dlinit (); | 86 | err = lt_dlinit (); |
87 | if (err > 0) | 87 | if (err > 0) |
88 | { | 88 | { |
89 | fprintf (stderr, _("Initialization of plugin mechanism failed: %s!\n"), | 89 | FPRINTF (stderr, _("Initialization of plugin mechanism failed: %s!\n"), |
90 | lt_dlerror ()); | 90 | lt_dlerror ()); |
91 | return; | 91 | return; |
92 | } | 92 | } |
diff --git a/src/util/test_common_allocation.c b/src/util/test_common_allocation.c index 950f0cedb..438d39751 100644 --- a/src/util/test_common_allocation.c +++ b/src/util/test_common_allocation.c | |||
@@ -105,7 +105,7 @@ main (int argc, char *argv[]) | |||
105 | GNUNET_log_setup ("test-common-allocation", "WARNING", NULL); | 105 | GNUNET_log_setup ("test-common-allocation", "WARNING", NULL); |
106 | ret = check (); | 106 | ret = check (); |
107 | if (ret != 0) | 107 | if (ret != 0) |
108 | fprintf (stderr, "ERROR %d.\n", ret); | 108 | FPRINTF (stderr, "ERROR %d.\n", ret); |
109 | return ret; | 109 | return ret; |
110 | } | 110 | } |
111 | 111 | ||
diff --git a/src/util/test_common_logging.c b/src/util/test_common_logging.c index d057db099..934586926 100644 --- a/src/util/test_common_logging.c +++ b/src/util/test_common_logging.c | |||
@@ -44,7 +44,7 @@ main (int argc, char *argv[]) | |||
44 | unsigned int logs = 0; | 44 | unsigned int logs = 0; |
45 | 45 | ||
46 | if (0 != putenv ("GNUNET_FORCE_LOG=")) | 46 | if (0 != putenv ("GNUNET_FORCE_LOG=")) |
47 | fprintf (stderr, "Failed to putenv: %s\n", strerror (errno)); | 47 | FPRINTF (stderr, "Failed to putenv: %s\n", strerror (errno)); |
48 | GNUNET_log_setup ("test-common-logging", "DEBUG", "/dev/null"); | 48 | GNUNET_log_setup ("test-common-logging", "DEBUG", "/dev/null"); |
49 | GNUNET_logger_add (&my_log, &logs); | 49 | GNUNET_logger_add (&my_log, &logs); |
50 | GNUNET_logger_add (&my_log, &logs); | 50 | GNUNET_logger_add (&my_log, &logs); |
@@ -60,7 +60,7 @@ main (int argc, char *argv[]) | |||
60 | GNUNET_logger_remove (&my_log, &logs); | 60 | GNUNET_logger_remove (&my_log, &logs); |
61 | if (logs != 4) | 61 | if (logs != 4) |
62 | { | 62 | { |
63 | fprintf (stdout, "Expected 4 log calls, got %u\n", logs); | 63 | FPRINTF (stdout, "Expected 4 log calls, got %u\n", logs); |
64 | failureCount++; | 64 | failureCount++; |
65 | } | 65 | } |
66 | GNUNET_break (0 == | 66 | GNUNET_break (0 == |
@@ -84,13 +84,13 @@ main (int argc, char *argv[]) | |||
84 | GNUNET_logger_remove (&my_log, &logs); | 84 | GNUNET_logger_remove (&my_log, &logs); |
85 | if (logs != 1) | 85 | if (logs != 1) |
86 | { | 86 | { |
87 | fprintf (stdout, "Expected 1 log call, got %u\n", logs); | 87 | FPRINTF (stdout, "Expected 1 log call, got %u\n", logs); |
88 | failureCount++; | 88 | failureCount++; |
89 | } | 89 | } |
90 | 90 | ||
91 | if (failureCount != 0) | 91 | if (failureCount != 0) |
92 | { | 92 | { |
93 | fprintf (stdout, "%u TESTS FAILED!\n", failureCount); | 93 | FPRINTF (stdout, "%u TESTS FAILED!\n", failureCount); |
94 | return -1; | 94 | return -1; |
95 | } | 95 | } |
96 | return 0; | 96 | return 0; |
diff --git a/src/util/test_common_logging_dummy.c b/src/util/test_common_logging_dummy.c index 005b5caef..9f6756ff4 100644 --- a/src/util/test_common_logging_dummy.c +++ b/src/util/test_common_logging_dummy.c | |||
@@ -37,7 +37,7 @@ my_log (void *ctx, enum GNUNET_ErrorType kind, const char *component, | |||
37 | { | 37 | { |
38 | if (strncmp ("test-common-logging-dummy", component, 25) != 0) | 38 | if (strncmp ("test-common-logging-dummy", component, 25) != 0) |
39 | return; | 39 | return; |
40 | fprintf (stdout, "%s", msg); | 40 | FPRINTF (stdout, "%s", msg); |
41 | fflush (stdout); | 41 | fflush (stdout); |
42 | } | 42 | } |
43 | 43 | ||
diff --git a/src/util/test_common_logging_runtime_loglevels.c b/src/util/test_common_logging_runtime_loglevels.c index 9b5b1228a..51123d9b3 100644 --- a/src/util/test_common_logging_runtime_loglevels.c +++ b/src/util/test_common_logging_runtime_loglevels.c | |||
@@ -171,7 +171,7 @@ read_call (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
171 | buf_ptr += rd; | 171 | buf_ptr += rd; |
172 | bytes += rd; | 172 | bytes += rd; |
173 | #if VERBOSE | 173 | #if VERBOSE |
174 | fprintf (stderr, "got %d bytes, reading more\n", rd); | 174 | FPRINTF (stderr, "got %d bytes, reading more\n", rd); |
175 | #endif | 175 | #endif |
176 | GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, | 176 | GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, |
177 | stdout_read_handle, &read_call, | 177 | stdout_read_handle, &read_call, |
@@ -180,7 +180,7 @@ read_call (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
180 | } | 180 | } |
181 | 181 | ||
182 | #if VERBOSE | 182 | #if VERBOSE |
183 | fprintf (stderr, "bytes is %d:%s\n", bytes, buf); | 183 | FPRINTF (stderr, "bytes is %d:%s\n", bytes, buf); |
184 | #endif | 184 | #endif |
185 | 185 | ||
186 | /* +------CHILD OUTPUT-- | 186 | /* +------CHILD OUTPUT-- |
@@ -251,7 +251,7 @@ read_call (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
251 | &delays[7], level))) | 251 | &delays[7], level))) |
252 | { | 252 | { |
253 | if (bytes == 20 * 16) | 253 | if (bytes == 20 * 16) |
254 | fprintf (stderr, "Ran out of buffer space!\n"); | 254 | FPRINTF (stderr, "%s", "Ran out of buffer space!\n"); |
255 | GNUNET_break (0); | 255 | GNUNET_break (0); |
256 | ok = 2; | 256 | ok = 2; |
257 | GNUNET_SCHEDULER_cancel (die_task); | 257 | GNUNET_SCHEDULER_cancel (die_task); |
diff --git a/src/util/test_configuration.c b/src/util/test_configuration.c index 3780b3649..b1a446f86 100644 --- a/src/util/test_configuration.c +++ b/src/util/test_configuration.c | |||
@@ -240,14 +240,14 @@ checkDiffs (struct GNUNET_CONFIGURATION_Handle *cfgDefault, int option) | |||
240 | GNUNET_CONFIGURATION_iterate (cfg, diffsCallBack, &cbData); | 240 | GNUNET_CONFIGURATION_iterate (cfg, diffsCallBack, &cbData); |
241 | if (1 == (ret = cbData.status)) | 241 | if (1 == (ret = cbData.status)) |
242 | { | 242 | { |
243 | fprintf (stderr, | 243 | FPRINTF (stderr, "%s", |
244 | "Incorrect Configuration Diffs: Diffs may contain data not actually edited\n"); | 244 | "Incorrect Configuration Diffs: Diffs may contain data not actually edited\n"); |
245 | goto housekeeping; | 245 | goto housekeeping; |
246 | } | 246 | } |
247 | cbData.cfgDiffs = cfg; | 247 | cbData.cfgDiffs = cfg; |
248 | GNUNET_CONFIGURATION_iterate (cfgDiffs, diffsCallBack, &cbData); | 248 | GNUNET_CONFIGURATION_iterate (cfgDiffs, diffsCallBack, &cbData); |
249 | if ((ret = cbData.status) == 1) | 249 | if ((ret = cbData.status) == 1) |
250 | fprintf (stderr, | 250 | FPRINTF (stderr, "%s", |
251 | "Incorrect Configuration Diffs: Data may be missing in diffs\n"); | 251 | "Incorrect Configuration Diffs: Data may be missing in diffs\n"); |
252 | 252 | ||
253 | housekeeping: | 253 | housekeeping: |
@@ -277,7 +277,7 @@ testConfig () | |||
277 | return 1; | 277 | return 1; |
278 | if (0 != strcmp ("b", c)) | 278 | if (0 != strcmp ("b", c)) |
279 | { | 279 | { |
280 | fprintf (stderr, "Got `%s'\n", c); | 280 | FPRINTF (stderr, "Got `%s'\n", c); |
281 | GNUNET_free (c); | 281 | GNUNET_free (c); |
282 | return 2; | 282 | return 2; |
283 | } | 283 | } |
@@ -470,7 +470,7 @@ main (int argc, char *argv[]) | |||
470 | if (GNUNET_OK != | 470 | if (GNUNET_OK != |
471 | GNUNET_CONFIGURATION_parse (cfg, "test_configuration_data.conf")) | 471 | GNUNET_CONFIGURATION_parse (cfg, "test_configuration_data.conf")) |
472 | { | 472 | { |
473 | fprintf (stderr, "Failed to parse configuration file\n"); | 473 | FPRINTF (stderr, "%s", "Failed to parse configuration file\n"); |
474 | GNUNET_CONFIGURATION_destroy (cfg); | 474 | GNUNET_CONFIGURATION_destroy (cfg); |
475 | return 1; | 475 | return 1; |
476 | } | 476 | } |
@@ -484,7 +484,7 @@ main (int argc, char *argv[]) | |||
484 | 484 | ||
485 | if (GNUNET_OK != GNUNET_CONFIGURATION_write (cfg, "/tmp/gnunet-test.conf")) | 485 | if (GNUNET_OK != GNUNET_CONFIGURATION_write (cfg, "/tmp/gnunet-test.conf")) |
486 | { | 486 | { |
487 | fprintf (stderr, "Failed to write configuration file\n"); | 487 | FPRINTF (stderr, "%s", "Failed to write configuration file\n"); |
488 | GNUNET_CONFIGURATION_destroy (cfg); | 488 | GNUNET_CONFIGURATION_destroy (cfg); |
489 | return 1; | 489 | return 1; |
490 | } | 490 | } |
@@ -546,7 +546,7 @@ main (int argc, char *argv[]) | |||
546 | error: | 546 | error: |
547 | if (failureCount != 0) | 547 | if (failureCount != 0) |
548 | { | 548 | { |
549 | fprintf (stderr, "Test failed: %u\n", failureCount); | 549 | FPRINTF (stderr, "Test failed: %u\n", failureCount); |
550 | return 1; | 550 | return 1; |
551 | } | 551 | } |
552 | return 0; | 552 | return 0; |
diff --git a/src/util/test_crypto_aes_weak.c b/src/util/test_crypto_aes_weak.c index a0161b575..0b7ba5c54 100644 --- a/src/util/test_crypto_aes_weak.c +++ b/src/util/test_crypto_aes_weak.c | |||
@@ -136,7 +136,7 @@ getWeakKeys () | |||
136 | { | 136 | { |
137 | 137 | ||
138 | if (number_of_runs % 1000 == 0) | 138 | if (number_of_runs % 1000 == 0) |
139 | fprintf (stderr, "."); | 139 | FPRINTF (stderr, "%s", "."); |
140 | /*printf("Got to run number %d.\n", number_of_runs); */ | 140 | /*printf("Got to run number %d.\n", number_of_runs); */ |
141 | GNUNET_CRYPTO_aes_create_session_key (&sessionkey); | 141 | GNUNET_CRYPTO_aes_create_session_key (&sessionkey); |
142 | 142 | ||
diff --git a/src/util/test_crypto_ksk.c b/src/util/test_crypto_ksk.c index 2789f5edb..58c459547 100644 --- a/src/util/test_crypto_ksk.c +++ b/src/util/test_crypto_ksk.c | |||
@@ -46,7 +46,7 @@ testCorrectKey () | |||
46 | int i; | 46 | int i; |
47 | char out[3]; | 47 | char out[3]; |
48 | 48 | ||
49 | fprintf (stderr, "Testing KBlock key correctness"); | 49 | FPRINTF (stderr, "%s", "Testing KBlock key correctness"); |
50 | GNUNET_CRYPTO_hash ("X", strlen ("X"), &in); | 50 | GNUNET_CRYPTO_hash ("X", strlen ("X"), &in); |
51 | hostkey = GNUNET_CRYPTO_rsa_key_create_from_hash (&in); | 51 | hostkey = GNUNET_CRYPTO_rsa_key_create_from_hash (&in); |
52 | if (hostkey == NULL) | 52 | if (hostkey == NULL) |
@@ -66,12 +66,12 @@ testCorrectKey () | |||
66 | snprintf (out, sizeof (out), "%02x", ((unsigned char *) &pkey)[i]); | 66 | snprintf (out, sizeof (out), "%02x", ((unsigned char *) &pkey)[i]); |
67 | if (0 != strncmp (out, &want[i * 2], 2)) | 67 | if (0 != strncmp (out, &want[i * 2], 2)) |
68 | { | 68 | { |
69 | fprintf (stderr, " Failed! Wanted %.2s but got %2s at %d\n", &want[i * 2], | 69 | FPRINTF (stderr, " Failed! Wanted %.2s but got %2s at %d\n", &want[i * 2], |
70 | out, i); | 70 | out, i); |
71 | return GNUNET_SYSERR; | 71 | return GNUNET_SYSERR; |
72 | } | 72 | } |
73 | } | 73 | } |
74 | fprintf (stderr, " OK\n"); | 74 | FPRINTF (stderr, "%s", " OK\n"); |
75 | return GNUNET_OK; | 75 | return GNUNET_OK; |
76 | } | 76 | } |
77 | 77 | ||
@@ -85,7 +85,7 @@ testMultiKey (const char *word) | |||
85 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey1; | 85 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey1; |
86 | int i; | 86 | int i; |
87 | 87 | ||
88 | fprintf (stderr, "Testing KBlock key uniqueness (%s) ", word); | 88 | FPRINTF (stderr, "Testing KBlock key uniqueness (%s) ", word); |
89 | GNUNET_CRYPTO_hash (word, strlen (word), &in); | 89 | GNUNET_CRYPTO_hash (word, strlen (word), &in); |
90 | hostkey = GNUNET_CRYPTO_rsa_key_create_from_hash (&in); | 90 | hostkey = GNUNET_CRYPTO_rsa_key_create_from_hash (&in); |
91 | if (hostkey == NULL) | 91 | if (hostkey == NULL) |
@@ -101,12 +101,12 @@ testMultiKey (const char *word) | |||
101 | GNUNET_CRYPTO_rsa_key_free (hostkey); | 101 | GNUNET_CRYPTO_rsa_key_free (hostkey); |
102 | for (i = 0; i < UNIQUE_ITER; i++) | 102 | for (i = 0; i < UNIQUE_ITER; i++) |
103 | { | 103 | { |
104 | fprintf (stderr, "."); | 104 | FPRINTF (stderr, "%s", "."); |
105 | hostkey = GNUNET_CRYPTO_rsa_key_create_from_hash (&in); | 105 | hostkey = GNUNET_CRYPTO_rsa_key_create_from_hash (&in); |
106 | if (hostkey == NULL) | 106 | if (hostkey == NULL) |
107 | { | 107 | { |
108 | GNUNET_break (0); | 108 | GNUNET_break (0); |
109 | fprintf (stderr, " ERROR\n"); | 109 | FPRINTF (stderr, "%s", " ERROR\n"); |
110 | return GNUNET_SYSERR; | 110 | return GNUNET_SYSERR; |
111 | } | 111 | } |
112 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey1); | 112 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey1); |
@@ -116,11 +116,11 @@ testMultiKey (const char *word) | |||
116 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded))) | 116 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded))) |
117 | { | 117 | { |
118 | GNUNET_break (0); | 118 | GNUNET_break (0); |
119 | fprintf (stderr, " ERROR\n"); | 119 | FPRINTF (stderr, "%s", " ERROR\n"); |
120 | return GNUNET_SYSERR; | 120 | return GNUNET_SYSERR; |
121 | } | 121 | } |
122 | } | 122 | } |
123 | fprintf (stderr, " OK\n"); | 123 | FPRINTF (stderr, "%s", " OK\n"); |
124 | return GNUNET_OK; | 124 | return GNUNET_OK; |
125 | } | 125 | } |
126 | 126 | ||
@@ -135,19 +135,19 @@ testEncryptDecrypt (struct GNUNET_CRYPTO_RsaPrivateKey *hostkey) | |||
135 | struct GNUNET_TIME_Absolute start; | 135 | struct GNUNET_TIME_Absolute start; |
136 | int ok; | 136 | int ok; |
137 | 137 | ||
138 | fprintf (stderr, "W"); | 138 | FPRINTF (stderr, "%s", "W"); |
139 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey); | 139 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey); |
140 | 140 | ||
141 | ok = 0; | 141 | ok = 0; |
142 | start = GNUNET_TIME_absolute_get (); | 142 | start = GNUNET_TIME_absolute_get (); |
143 | for (i = 0; i < ITER; i++) | 143 | for (i = 0; i < ITER; i++) |
144 | { | 144 | { |
145 | fprintf (stderr, "."); | 145 | FPRINTF (stderr, "%s", "."); |
146 | if (GNUNET_SYSERR == | 146 | if (GNUNET_SYSERR == |
147 | GNUNET_CRYPTO_rsa_encrypt (TESTSTRING, strlen (TESTSTRING) + 1, &pkey, | 147 | GNUNET_CRYPTO_rsa_encrypt (TESTSTRING, strlen (TESTSTRING) + 1, &pkey, |
148 | &target)) | 148 | &target)) |
149 | { | 149 | { |
150 | fprintf (stderr, "GNUNET_CRYPTO_rsa_encrypt returned SYSERR\n"); | 150 | FPRINTF (stderr, "%s", "GNUNET_CRYPTO_rsa_encrypt returned SYSERR\n"); |
151 | ok++; | 151 | ok++; |
152 | continue; | 152 | continue; |
153 | } | 153 | } |
@@ -155,7 +155,7 @@ testEncryptDecrypt (struct GNUNET_CRYPTO_RsaPrivateKey *hostkey) | |||
155 | GNUNET_CRYPTO_rsa_decrypt (hostkey, &target, result, | 155 | GNUNET_CRYPTO_rsa_decrypt (hostkey, &target, result, |
156 | strlen (TESTSTRING) + 1)) | 156 | strlen (TESTSTRING) + 1)) |
157 | { | 157 | { |
158 | fprintf (stderr, "GNUNET_CRYPTO_rsa_decrypt returned SYSERR\n"); | 158 | FPRINTF (stderr, "%s", "GNUNET_CRYPTO_rsa_decrypt returned SYSERR\n"); |
159 | ok++; | 159 | ok++; |
160 | continue; | 160 | continue; |
161 | } | 161 | } |
@@ -186,17 +186,17 @@ testSignVerify (struct GNUNET_CRYPTO_RsaPrivateKey *hostkey) | |||
186 | struct GNUNET_TIME_Absolute start; | 186 | struct GNUNET_TIME_Absolute start; |
187 | int ok = GNUNET_OK; | 187 | int ok = GNUNET_OK; |
188 | 188 | ||
189 | fprintf (stderr, "W"); | 189 | FPRINTF (stderr, "%s", "W"); |
190 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey); | 190 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey); |
191 | start = GNUNET_TIME_absolute_get (); | 191 | start = GNUNET_TIME_absolute_get (); |
192 | purp.size = htonl (sizeof (struct GNUNET_CRYPTO_RsaSignaturePurpose)); | 192 | purp.size = htonl (sizeof (struct GNUNET_CRYPTO_RsaSignaturePurpose)); |
193 | purp.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_TEST); | 193 | purp.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_TEST); |
194 | for (i = 0; i < ITER; i++) | 194 | for (i = 0; i < ITER; i++) |
195 | { | 195 | { |
196 | fprintf (stderr, "."); | 196 | FPRINTF (stderr, "%s", "."); |
197 | if (GNUNET_SYSERR == GNUNET_CRYPTO_rsa_sign (hostkey, &purp, &sig)) | 197 | if (GNUNET_SYSERR == GNUNET_CRYPTO_rsa_sign (hostkey, &purp, &sig)) |
198 | { | 198 | { |
199 | fprintf (stderr, "GNUNET_CRYPTO_rsa_sign returned SYSERR\n"); | 199 | FPRINTF (stderr, "%s", "GNUNET_CRYPTO_rsa_sign returned SYSERR\n"); |
200 | ok = GNUNET_SYSERR; | 200 | ok = GNUNET_SYSERR; |
201 | continue; | 201 | continue; |
202 | } | 202 | } |
diff --git a/src/util/test_crypto_random.c b/src/util/test_crypto_random.c index 46d3ed0aa..681947a60 100644 --- a/src/util/test_crypto_random.c +++ b/src/util/test_crypto_random.c | |||
@@ -43,7 +43,7 @@ test (enum GNUNET_CRYPTO_Quality mode) | |||
43 | b2 = GNUNET_CRYPTO_random_permute (mode, 1024); | 43 | b2 = GNUNET_CRYPTO_random_permute (mode, 1024); |
44 | if (0 == memcmp (b2, buf, sizeof (buf))) | 44 | if (0 == memcmp (b2, buf, sizeof (buf))) |
45 | { | 45 | { |
46 | fprintf (stderr, "!"); | 46 | FPRINTF (stderr, "%s", "!"); |
47 | GNUNET_free (b2); | 47 | GNUNET_free (b2); |
48 | continue; | 48 | continue; |
49 | } | 49 | } |
diff --git a/src/util/test_crypto_rsa.c b/src/util/test_crypto_rsa.c index f26a76a38..f6800afcd 100644 --- a/src/util/test_crypto_rsa.c +++ b/src/util/test_crypto_rsa.c | |||
@@ -47,7 +47,7 @@ testEncryptDecrypt () | |||
47 | struct GNUNET_TIME_Absolute start; | 47 | struct GNUNET_TIME_Absolute start; |
48 | int ok; | 48 | int ok; |
49 | 49 | ||
50 | fprintf (stderr, "W"); | 50 | FPRINTF (stderr, "%s", "W"); |
51 | hostkey = GNUNET_CRYPTO_rsa_key_create (); | 51 | hostkey = GNUNET_CRYPTO_rsa_key_create (); |
52 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey); | 52 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey); |
53 | 53 | ||
@@ -55,12 +55,12 @@ testEncryptDecrypt () | |||
55 | start = GNUNET_TIME_absolute_get (); | 55 | start = GNUNET_TIME_absolute_get (); |
56 | for (i = 0; i < ITER; i++) | 56 | for (i = 0; i < ITER; i++) |
57 | { | 57 | { |
58 | fprintf (stderr, "."); | 58 | FPRINTF (stderr, "%s", "."); |
59 | if (GNUNET_SYSERR == | 59 | if (GNUNET_SYSERR == |
60 | GNUNET_CRYPTO_rsa_encrypt (TESTSTRING, strlen (TESTSTRING) + 1, &pkey, | 60 | GNUNET_CRYPTO_rsa_encrypt (TESTSTRING, strlen (TESTSTRING) + 1, &pkey, |
61 | &target)) | 61 | &target)) |
62 | { | 62 | { |
63 | fprintf (stderr, "GNUNET_CRYPTO_rsa_encrypt returned SYSERR\n"); | 63 | FPRINTF (stderr, "%s", "GNUNET_CRYPTO_rsa_encrypt returned SYSERR\n"); |
64 | ok++; | 64 | ok++; |
65 | continue; | 65 | continue; |
66 | } | 66 | } |
@@ -68,7 +68,7 @@ testEncryptDecrypt () | |||
68 | GNUNET_CRYPTO_rsa_decrypt (hostkey, &target, result, | 68 | GNUNET_CRYPTO_rsa_decrypt (hostkey, &target, result, |
69 | strlen (TESTSTRING) + 1)) | 69 | strlen (TESTSTRING) + 1)) |
70 | { | 70 | { |
71 | fprintf (stderr, "GNUNET_CRYPTO_rsa_decrypt returned SYSERR\n"); | 71 | FPRINTF (stderr, "%s", "GNUNET_CRYPTO_rsa_decrypt returned SYSERR\n"); |
72 | ok++; | 72 | ok++; |
73 | continue; | 73 | continue; |
74 | 74 | ||
@@ -102,7 +102,7 @@ testEncryptPerformance () | |||
102 | struct GNUNET_TIME_Absolute start; | 102 | struct GNUNET_TIME_Absolute start; |
103 | int ok; | 103 | int ok; |
104 | 104 | ||
105 | fprintf (stderr, "W"); | 105 | FPRINTF (stderr, "%s", "W"); |
106 | hostkey = GNUNET_CRYPTO_rsa_key_create (); | 106 | hostkey = GNUNET_CRYPTO_rsa_key_create (); |
107 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey); | 107 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey); |
108 | 108 | ||
@@ -110,12 +110,12 @@ testEncryptPerformance () | |||
110 | start = GNUNET_TIME_absolute_get (); | 110 | start = GNUNET_TIME_absolute_get (); |
111 | for (i = 0; i < ITER; i++) | 111 | for (i = 0; i < ITER; i++) |
112 | { | 112 | { |
113 | fprintf (stderr, "."); | 113 | FPRINTF (stderr, "%s", "."); |
114 | if (GNUNET_SYSERR == | 114 | if (GNUNET_SYSERR == |
115 | GNUNET_CRYPTO_rsa_encrypt (TESTSTRING, strlen (TESTSTRING) + 1, &pkey, | 115 | GNUNET_CRYPTO_rsa_encrypt (TESTSTRING, strlen (TESTSTRING) + 1, &pkey, |
116 | &target)) | 116 | &target)) |
117 | { | 117 | { |
118 | fprintf (stderr, "GNUNET_CRYPTO_rsa_encrypt returned SYSERR\n"); | 118 | FPRINTF (stderr, "%s", "GNUNET_CRYPTO_rsa_encrypt returned SYSERR\n"); |
119 | ok++; | 119 | ok++; |
120 | continue; | 120 | continue; |
121 | } | 121 | } |
@@ -142,7 +142,7 @@ testEncryptDecryptSK () | |||
142 | struct GNUNET_TIME_Absolute start; | 142 | struct GNUNET_TIME_Absolute start; |
143 | int ok; | 143 | int ok; |
144 | 144 | ||
145 | fprintf (stderr, "W"); | 145 | FPRINTF (stderr, "%s", "W"); |
146 | hostkey = GNUNET_CRYPTO_rsa_key_create (); | 146 | hostkey = GNUNET_CRYPTO_rsa_key_create (); |
147 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey); | 147 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey); |
148 | 148 | ||
@@ -150,14 +150,14 @@ testEncryptDecryptSK () | |||
150 | start = GNUNET_TIME_absolute_get (); | 150 | start = GNUNET_TIME_absolute_get (); |
151 | for (i = 0; i < ITER; i++) | 151 | for (i = 0; i < ITER; i++) |
152 | { | 152 | { |
153 | fprintf (stderr, "."); | 153 | FPRINTF (stderr, "%s", "."); |
154 | GNUNET_CRYPTO_aes_create_session_key (&insk); | 154 | GNUNET_CRYPTO_aes_create_session_key (&insk); |
155 | if (GNUNET_SYSERR == | 155 | if (GNUNET_SYSERR == |
156 | GNUNET_CRYPTO_rsa_encrypt (&insk, | 156 | GNUNET_CRYPTO_rsa_encrypt (&insk, |
157 | sizeof (struct GNUNET_CRYPTO_AesSessionKey), | 157 | sizeof (struct GNUNET_CRYPTO_AesSessionKey), |
158 | &pkey, &target)) | 158 | &pkey, &target)) |
159 | { | 159 | { |
160 | fprintf (stderr, "GNUNET_CRYPTO_rsa_encrypt returned SYSERR\n"); | 160 | FPRINTF (stderr, "%s", "GNUNET_CRYPTO_rsa_encrypt returned SYSERR\n"); |
161 | ok++; | 161 | ok++; |
162 | continue; | 162 | continue; |
163 | } | 163 | } |
@@ -165,7 +165,7 @@ testEncryptDecryptSK () | |||
165 | GNUNET_CRYPTO_rsa_decrypt (hostkey, &target, &outsk, | 165 | GNUNET_CRYPTO_rsa_decrypt (hostkey, &target, &outsk, |
166 | sizeof (struct GNUNET_CRYPTO_AesSessionKey))) | 166 | sizeof (struct GNUNET_CRYPTO_AesSessionKey))) |
167 | { | 167 | { |
168 | fprintf (stderr, "GNUNET_CRYPTO_rsa_decrypt returned SYSERR\n"); | 168 | FPRINTF (stderr, "%s", "GNUNET_CRYPTO_rsa_decrypt returned SYSERR\n"); |
169 | ok++; | 169 | ok++; |
170 | continue; | 170 | continue; |
171 | } | 171 | } |
@@ -198,7 +198,7 @@ testSignVerify () | |||
198 | struct GNUNET_TIME_Absolute start; | 198 | struct GNUNET_TIME_Absolute start; |
199 | int ok = GNUNET_OK; | 199 | int ok = GNUNET_OK; |
200 | 200 | ||
201 | fprintf (stderr, "W"); | 201 | FPRINTF (stderr, "%s", "W"); |
202 | hostkey = GNUNET_CRYPTO_rsa_key_create (); | 202 | hostkey = GNUNET_CRYPTO_rsa_key_create (); |
203 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey); | 203 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey); |
204 | start = GNUNET_TIME_absolute_get (); | 204 | start = GNUNET_TIME_absolute_get (); |
@@ -207,10 +207,10 @@ testSignVerify () | |||
207 | 207 | ||
208 | for (i = 0; i < ITER; i++) | 208 | for (i = 0; i < ITER; i++) |
209 | { | 209 | { |
210 | fprintf (stderr, "."); | 210 | FPRINTF (stderr, "%s", "."); |
211 | if (GNUNET_SYSERR == GNUNET_CRYPTO_rsa_sign (hostkey, &purp, &sig)) | 211 | if (GNUNET_SYSERR == GNUNET_CRYPTO_rsa_sign (hostkey, &purp, &sig)) |
212 | { | 212 | { |
213 | fprintf (stderr, "GNUNET_CRYPTO_rsa_sign returned SYSERR\n"); | 213 | FPRINTF (stderr, "%s", "GNUNET_CRYPTO_rsa_sign returned SYSERR\n"); |
214 | ok = GNUNET_SYSERR; | 214 | ok = GNUNET_SYSERR; |
215 | continue; | 215 | continue; |
216 | } | 216 | } |
@@ -253,16 +253,16 @@ testSignPerformance () | |||
253 | 253 | ||
254 | purp.size = htonl (sizeof (struct GNUNET_CRYPTO_RsaSignaturePurpose)); | 254 | purp.size = htonl (sizeof (struct GNUNET_CRYPTO_RsaSignaturePurpose)); |
255 | purp.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_TEST); | 255 | purp.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_TEST); |
256 | fprintf (stderr, "W"); | 256 | FPRINTF (stderr, "%s", "W"); |
257 | hostkey = GNUNET_CRYPTO_rsa_key_create (); | 257 | hostkey = GNUNET_CRYPTO_rsa_key_create (); |
258 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey); | 258 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey); |
259 | start = GNUNET_TIME_absolute_get (); | 259 | start = GNUNET_TIME_absolute_get (); |
260 | for (i = 0; i < ITER; i++) | 260 | for (i = 0; i < ITER; i++) |
261 | { | 261 | { |
262 | fprintf (stderr, "."); | 262 | FPRINTF (stderr, "%s", "."); |
263 | if (GNUNET_SYSERR == GNUNET_CRYPTO_rsa_sign (hostkey, &purp, &sig)) | 263 | if (GNUNET_SYSERR == GNUNET_CRYPTO_rsa_sign (hostkey, &purp, &sig)) |
264 | { | 264 | { |
265 | fprintf (stderr, "GNUNET_CRYPTO_rsa_sign returned SYSERR\n"); | 265 | FPRINTF (stderr, "%s", "GNUNET_CRYPTO_rsa_sign returned SYSERR\n"); |
266 | ok = GNUNET_SYSERR; | 266 | ok = GNUNET_SYSERR; |
267 | continue; | 267 | continue; |
268 | } | 268 | } |
diff --git a/src/util/test_disk.c b/src/util/test_disk.c index 91154a6f5..546277256 100644 --- a/src/util/test_disk.c +++ b/src/util/test_disk.c | |||
@@ -46,13 +46,13 @@ testReadWrite () | |||
46 | ret = GNUNET_DISK_fn_read (".testfile", tmp, sizeof (tmp) - 1); | 46 | ret = GNUNET_DISK_fn_read (".testfile", tmp, sizeof (tmp) - 1); |
47 | if (ret < 0) | 47 | if (ret < 0) |
48 | { | 48 | { |
49 | fprintf (stderr, "Error reading file `%s' in testReadWrite\n", ".testfile"); | 49 | FPRINTF (stderr, "Error reading file `%s' in testReadWrite\n", ".testfile"); |
50 | return 1; | 50 | return 1; |
51 | } | 51 | } |
52 | tmp[ret] = '\0'; | 52 | tmp[ret] = '\0'; |
53 | if (0 != memcmp (tmp, TESTSTRING, strlen (TESTSTRING) + 1)) | 53 | if (0 != memcmp (tmp, TESTSTRING, strlen (TESTSTRING) + 1)) |
54 | { | 54 | { |
55 | fprintf (stderr, "Error in testReadWrite: *%s* != *%s* for file %s\n", tmp, | 55 | FPRINTF (stderr, "Error in testReadWrite: *%s* != *%s* for file %s\n", tmp, |
56 | TESTSTRING, ".testfile"); | 56 | TESTSTRING, ".testfile"); |
57 | return 1; | 57 | return 1; |
58 | } | 58 | } |
@@ -61,14 +61,14 @@ testReadWrite () | |||
61 | ret = GNUNET_DISK_fn_read (".testfile2", tmp, sizeof (tmp) - 1); | 61 | ret = GNUNET_DISK_fn_read (".testfile2", tmp, sizeof (tmp) - 1); |
62 | if (ret < 0) | 62 | if (ret < 0) |
63 | { | 63 | { |
64 | fprintf (stderr, "Error reading file `%s' in testReadWrite\n", | 64 | FPRINTF (stderr, "Error reading file `%s' in testReadWrite\n", |
65 | ".testfile2"); | 65 | ".testfile2"); |
66 | return 1; | 66 | return 1; |
67 | } | 67 | } |
68 | tmp[ret] = '\0'; | 68 | tmp[ret] = '\0'; |
69 | if (0 != memcmp (tmp, TESTSTRING, strlen (TESTSTRING) + 1)) | 69 | if (0 != memcmp (tmp, TESTSTRING, strlen (TESTSTRING) + 1)) |
70 | { | 70 | { |
71 | fprintf (stderr, "Error in testReadWrite: *%s* != *%s* for file %s\n", tmp, | 71 | FPRINTF (stderr, "Error in testReadWrite: *%s* != *%s* for file %s\n", tmp, |
72 | TESTSTRING, ".testfile2"); | 72 | TESTSTRING, ".testfile2"); |
73 | return 1; | 73 | return 1; |
74 | } | 74 | } |
@@ -276,7 +276,7 @@ main (int argc, char *argv[]) | |||
276 | failureCount += testDirMani (); | 276 | failureCount += testDirMani (); |
277 | if (failureCount != 0) | 277 | if (failureCount != 0) |
278 | { | 278 | { |
279 | fprintf (stderr, "\n%u TESTS FAILED!\n", failureCount); | 279 | FPRINTF (stderr, "\n%u TESTS FAILED!\n", failureCount); |
280 | return -1; | 280 | return -1; |
281 | } | 281 | } |
282 | return 0; | 282 | return 0; |
diff --git a/src/util/test_os_start_process.c b/src/util/test_os_start_process.c index df8520546..78538404a 100644 --- a/src/util/test_os_start_process.c +++ b/src/util/test_os_start_process.c | |||
@@ -75,7 +75,7 @@ read_call (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
75 | bytes = GNUNET_DISK_file_read (stdout_read_handle, &buf, sizeof (buf)); | 75 | bytes = GNUNET_DISK_file_read (stdout_read_handle, &buf, sizeof (buf)); |
76 | 76 | ||
77 | #if VERBOSE | 77 | #if VERBOSE |
78 | fprintf (stderr, "bytes is %d\n", bytes); | 78 | FPRINTF (stderr, "bytes is %d\n", bytes); |
79 | #endif | 79 | #endif |
80 | 80 | ||
81 | if (bytes < 1) | 81 | if (bytes < 1) |
@@ -89,7 +89,7 @@ read_call (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
89 | 89 | ||
90 | ok = strncmp (&buf[0], test_phrase, strlen (test_phrase)); | 90 | ok = strncmp (&buf[0], test_phrase, strlen (test_phrase)); |
91 | #if VERBOSE | 91 | #if VERBOSE |
92 | fprintf (stderr, "read %s\n", &buf[0]); | 92 | FPRINTF (stderr, "read %s\n", &buf[0]); |
93 | #endif | 93 | #endif |
94 | if (ok == 0) | 94 | if (ok == 0) |
95 | { | 95 | { |
diff --git a/src/util/test_peer.c b/src/util/test_peer.c index 3817d8243..9bf443600 100644 --- a/src/util/test_peer.c +++ b/src/util/test_peer.c | |||
@@ -69,7 +69,7 @@ check () | |||
69 | pid = GNUNET_PEER_intern (&pidArr[i]); | 69 | pid = GNUNET_PEER_intern (&pidArr[i]); |
70 | if (pid != (i + 1)) | 70 | if (pid != (i + 1)) |
71 | { | 71 | { |
72 | fprintf (stderr, "Unexpected Peer ID returned by intern function\n"); | 72 | FPRINTF (stderr, "%s", "Unexpected Peer ID returned by intern function\n"); |
73 | return 1; | 73 | return 1; |
74 | } | 74 | } |
75 | } | 75 | } |
@@ -80,7 +80,7 @@ check () | |||
80 | pid = GNUNET_PEER_intern (&pidArr[i]); | 80 | pid = GNUNET_PEER_intern (&pidArr[i]); |
81 | if (pid != (i + 1)) | 81 | if (pid != (i + 1)) |
82 | { | 82 | { |
83 | fprintf (stderr, "Unexpected Peer ID returned by intern function\n"); | 83 | FPRINTF (stderr, "%s", "Unexpected Peer ID returned by intern function\n"); |
84 | return 1; | 84 | return 1; |
85 | } | 85 | } |
86 | } | 86 | } |
diff --git a/src/util/test_resolver_api.c b/src/util/test_resolver_api.c index 4e248aa72..75140f8d5 100644 --- a/src/util/test_resolver_api.c +++ b/src/util/test_resolver_api.c | |||
@@ -264,8 +264,8 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
264 | _("gethostbyname() could not lookup IP address: %s\n"), | 264 | _("gethostbyname() could not lookup IP address: %s\n"), |
265 | hstrerror (h_errno)); | 265 | hstrerror (h_errno)); |
266 | #endif | 266 | #endif |
267 | fprintf (stderr, | 267 | FPRINTF (stderr, |
268 | "System seems to be off-line, will not run all DNS tests\n"); | 268 | "System seems to be off-line, will not run all DNS tests\n", NULL); |
269 | *ok = 0; /* mark test as passing anyway */ | 269 | *ok = 0; /* mark test as passing anyway */ |
270 | return; | 270 | return; |
271 | } | 271 | } |
@@ -422,7 +422,7 @@ check () | |||
422 | GNUNET_OS_process_close (proc); | 422 | GNUNET_OS_process_close (proc); |
423 | proc = NULL; | 423 | proc = NULL; |
424 | if (ok != 0) | 424 | if (ok != 0) |
425 | fprintf (stderr, "Missed some resolutions: %u\n", ok); | 425 | FPRINTF (stderr, "Missed some resolutions: %u\n", ok); |
426 | return ok; | 426 | return ok; |
427 | } | 427 | } |
428 | 428 | ||
diff --git a/src/util/test_scheduler_delay.c b/src/util/test_scheduler_delay.c index ff6966a87..9cbf7d90f 100644 --- a/src/util/test_scheduler_delay.c +++ b/src/util/test_scheduler_delay.c | |||
@@ -59,10 +59,10 @@ test_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
59 | target = | 59 | target = |
60 | GNUNET_TIME_relative_to_absolute (GNUNET_TIME_relative_multiply | 60 | GNUNET_TIME_relative_to_absolute (GNUNET_TIME_relative_multiply |
61 | (GNUNET_TIME_UNIT_MILLISECONDS, i)); | 61 | (GNUNET_TIME_UNIT_MILLISECONDS, i)); |
62 | fprintf (stderr, "."); | 62 | FPRINTF (stderr, "%s", "."); |
63 | if (i > MAXV) | 63 | if (i > MAXV) |
64 | { | 64 | { |
65 | fprintf (stderr, "\n"); | 65 | FPRINTF (stderr, "%s", "\n"); |
66 | return; | 66 | return; |
67 | } | 67 | } |
68 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply | 68 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply |
@@ -79,13 +79,13 @@ check () | |||
79 | FPRINTF (stdout, "Sleep precision: %llu ms. ", | 79 | FPRINTF (stdout, "Sleep precision: %llu ms. ", |
80 | cumDelta / 1000 / (MAXV / INCR)); | 80 | cumDelta / 1000 / (MAXV / INCR)); |
81 | if (cumDelta <= 10 * MAXV / INCR) | 81 | if (cumDelta <= 10 * MAXV / INCR) |
82 | fprintf (stdout, "Timer precision is excellent.\n"); | 82 | FPRINTF (stdout, "%s", "Timer precision is excellent.\n"); |
83 | else if (cumDelta <= 50 * MAXV / INCR) /* 50 ms average deviation */ | 83 | else if (cumDelta <= 50 * MAXV / INCR) /* 50 ms average deviation */ |
84 | fprintf (stdout, "Timer precision is good.\n"); | 84 | FPRINTF (stdout, "%s", "Timer precision is good.\n"); |
85 | else if (cumDelta > 250 * MAXV / INCR) | 85 | else if (cumDelta > 250 * MAXV / INCR) |
86 | fprintf (stdout, "Timer precision is awful.\n"); | 86 | FPRINTF (stdout, "%s", "Timer precision is awful.\n"); |
87 | else | 87 | else |
88 | fprintf (stdout, "Timer precision is acceptable.\n"); | 88 | FPRINTF (stdout, "%s", "Timer precision is acceptable.\n"); |
89 | return 0; | 89 | return 0; |
90 | } | 90 | } |
91 | 91 | ||
diff --git a/src/util/test_service.c b/src/util/test_service.c index 1b78932f8..eff8c7570 100644 --- a/src/util/test_service.c +++ b/src/util/test_service.c | |||
@@ -270,7 +270,7 @@ main (int argc, char *argv[]) | |||
270 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "socket"); | 270 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "socket"); |
271 | return 1; | 271 | return 1; |
272 | } | 272 | } |
273 | fprintf (stderr, | 273 | FPRINTF (stderr, |
274 | "IPv6 support seems to not be available (%s), not testing it!\n", | 274 | "IPv6 support seems to not be available (%s), not testing it!\n", |
275 | strerror (errno)); | 275 | strerror (errno)); |
276 | } | 276 | } |
diff --git a/src/util/test_strings.c b/src/util/test_strings.c index c6d604144..7e68153d7 100644 --- a/src/util/test_strings.c +++ b/src/util/test_strings.c | |||
@@ -89,7 +89,7 @@ check () | |||
89 | * however, the "0:05 19" should always be there; hence: */ | 89 | * however, the "0:05 19" should always be there; hence: */ |
90 | if (NULL == strstr (r, "0:05 19")) | 90 | if (NULL == strstr (r, "0:05 19")) |
91 | { | 91 | { |
92 | fprintf (stderr, "Got %s\n", r); | 92 | FPRINTF (stderr, "Got %s\n", r); |
93 | GNUNET_break (0); | 93 | GNUNET_break (0); |
94 | GNUNET_free (r); | 94 | GNUNET_free (r); |
95 | return 1; | 95 | return 1; |