diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-10-05 15:09:28 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-10-05 15:09:28 +0200 |
commit | c4e9ba925ffd758aaa3feee2ccfc0b76f26fe207 (patch) | |
tree | cac3ce030d77b4cbe7c7dc62ed58cfe6d24f73e1 /src/fs/test_plugin_block_fs.c | |
parent | fbb71d527c7d6babf269a8fefce1db291b9f7068 (diff) | |
download | gnunet-c4e9ba925ffd758aaa3feee2ccfc0b76f26fe207.tar.gz gnunet-c4e9ba925ffd758aaa3feee2ccfc0b76f26fe207.zip |
global reindent, now with uncrustify hook enabled
Diffstat (limited to 'src/fs/test_plugin_block_fs.c')
-rw-r--r-- | src/fs/test_plugin_block_fs.c | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/src/fs/test_plugin_block_fs.c b/src/fs/test_plugin_block_fs.c index 53f7304dd..305da2f18 100644 --- a/src/fs/test_plugin_block_fs.c +++ b/src/fs/test_plugin_block_fs.c | |||
@@ -27,64 +27,64 @@ | |||
27 | 27 | ||
28 | 28 | ||
29 | static int | 29 | static int |
30 | test_fs(struct GNUNET_BLOCK_Context *ctx) | 30 | test_fs (struct GNUNET_BLOCK_Context *ctx) |
31 | { | 31 | { |
32 | struct GNUNET_HashCode key; | 32 | struct GNUNET_HashCode key; |
33 | char block[4]; | 33 | char block[4]; |
34 | 34 | ||
35 | memset(block, 1, sizeof(block)); | 35 | memset (block, 1, sizeof(block)); |
36 | if (GNUNET_OK != | 36 | if (GNUNET_OK != |
37 | GNUNET_BLOCK_get_key(ctx, GNUNET_BLOCK_TYPE_FS_DBLOCK, block, | 37 | GNUNET_BLOCK_get_key (ctx, GNUNET_BLOCK_TYPE_FS_DBLOCK, block, |
38 | sizeof(block), &key)) | 38 | sizeof(block), &key)) |
39 | return 1; | 39 | return 1; |
40 | if (GNUNET_BLOCK_EVALUATION_OK_LAST != | 40 | if (GNUNET_BLOCK_EVALUATION_OK_LAST != |
41 | GNUNET_BLOCK_evaluate(ctx, | 41 | GNUNET_BLOCK_evaluate (ctx, |
42 | GNUNET_BLOCK_TYPE_FS_DBLOCK, | 42 | GNUNET_BLOCK_TYPE_FS_DBLOCK, |
43 | NULL, | 43 | NULL, |
44 | GNUNET_BLOCK_EO_NONE, | 44 | GNUNET_BLOCK_EO_NONE, |
45 | &key, | 45 | &key, |
46 | NULL, 0, | 46 | NULL, 0, |
47 | block, sizeof(block))) | 47 | block, sizeof(block))) |
48 | return 2; | 48 | return 2; |
49 | if (GNUNET_BLOCK_EVALUATION_REQUEST_VALID != | 49 | if (GNUNET_BLOCK_EVALUATION_REQUEST_VALID != |
50 | GNUNET_BLOCK_evaluate(ctx, | 50 | GNUNET_BLOCK_evaluate (ctx, |
51 | GNUNET_BLOCK_TYPE_FS_DBLOCK, | 51 | GNUNET_BLOCK_TYPE_FS_DBLOCK, |
52 | NULL, | 52 | NULL, |
53 | GNUNET_BLOCK_EO_NONE, | 53 | GNUNET_BLOCK_EO_NONE, |
54 | &key, | 54 | &key, |
55 | NULL, 0, | 55 | NULL, 0, |
56 | NULL, 0)) | 56 | NULL, 0)) |
57 | return 4; | 57 | return 4; |
58 | GNUNET_log_skip(1, GNUNET_NO); | 58 | GNUNET_log_skip (1, GNUNET_NO); |
59 | if (GNUNET_BLOCK_EVALUATION_REQUEST_INVALID != | 59 | if (GNUNET_BLOCK_EVALUATION_REQUEST_INVALID != |
60 | GNUNET_BLOCK_evaluate(ctx, | 60 | GNUNET_BLOCK_evaluate (ctx, |
61 | GNUNET_BLOCK_TYPE_FS_DBLOCK, | 61 | GNUNET_BLOCK_TYPE_FS_DBLOCK, |
62 | NULL, | 62 | NULL, |
63 | GNUNET_BLOCK_EO_NONE, | 63 | GNUNET_BLOCK_EO_NONE, |
64 | &key, | 64 | &key, |
65 | "bogus", 5, | 65 | "bogus", 5, |
66 | NULL, 0)) | 66 | NULL, 0)) |
67 | return 8; | 67 | return 8; |
68 | GNUNET_log_skip(0, GNUNET_YES); | 68 | GNUNET_log_skip (0, GNUNET_YES); |
69 | return 0; | 69 | return 0; |
70 | } | 70 | } |
71 | 71 | ||
72 | 72 | ||
73 | int | 73 | int |
74 | main(int argc, char *argv[]) | 74 | main (int argc, char *argv[]) |
75 | { | 75 | { |
76 | int ret; | 76 | int ret; |
77 | struct GNUNET_BLOCK_Context *ctx; | 77 | struct GNUNET_BLOCK_Context *ctx; |
78 | struct GNUNET_CONFIGURATION_Handle *cfg; | 78 | struct GNUNET_CONFIGURATION_Handle *cfg; |
79 | 79 | ||
80 | GNUNET_log_setup("test-block", "WARNING", NULL); | 80 | GNUNET_log_setup ("test-block", "WARNING", NULL); |
81 | cfg = GNUNET_CONFIGURATION_create(); | 81 | cfg = GNUNET_CONFIGURATION_create (); |
82 | ctx = GNUNET_BLOCK_context_create(cfg); | 82 | ctx = GNUNET_BLOCK_context_create (cfg); |
83 | ret = test_fs(ctx); | 83 | ret = test_fs (ctx); |
84 | GNUNET_BLOCK_context_destroy(ctx); | 84 | GNUNET_BLOCK_context_destroy (ctx); |
85 | GNUNET_CONFIGURATION_destroy(cfg); | 85 | GNUNET_CONFIGURATION_destroy (cfg); |
86 | if (ret != 0) | 86 | if (ret != 0) |
87 | fprintf(stderr, "Tests failed: %d\n", ret); | 87 | fprintf (stderr, "Tests failed: %d\n", ret); |
88 | return ret; | 88 | return ret; |
89 | } | 89 | } |
90 | 90 | ||