diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-12-30 22:42:04 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-12-30 22:42:04 +0000 |
commit | 416c2f5a713b93ba689a8cd1e038682a53e6bc17 (patch) | |
tree | 987f51d9edfddc02afe1524df5e1156b920c71d4 /src/util/test_disk.c | |
parent | fceec98e767bce7ad2c24dde73cdcf8837e04013 (diff) | |
download | gnunet-416c2f5a713b93ba689a8cd1e038682a53e6bc17.tar.gz gnunet-416c2f5a713b93ba689a8cd1e038682a53e6bc17.zip |
-LRN: use FPRINTF -- #2051
Diffstat (limited to 'src/util/test_disk.c')
-rw-r--r-- | src/util/test_disk.c | 10 |
1 files changed, 5 insertions, 5 deletions
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; |