diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-11-24 19:13:00 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-11-24 19:13:00 +0100 |
commit | d17a17ea785f91c18b5694eab3372c4e4564d95e (patch) | |
tree | a7ee983fb1c0fa5a9210938024357cd9498ee344 /src/util | |
parent | 5f38569fce2e77afeed58cbd3429c67bf8ab9109 (diff) | |
download | gnunet-d17a17ea785f91c18b5694eab3372c4e4564d95e.tar.gz gnunet-d17a17ea785f91c18b5694eab3372c4e4564d95e.zip |
fix pointer indentation
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/crypto_abe.c | 20 | ||||
-rw-r--r-- | src/util/crypto_ecc_dlog.c | 4 | ||||
-rw-r--r-- | src/util/crypto_hash.c | 4 | ||||
-rw-r--r-- | src/util/gnunet-resolver.c | 2 | ||||
-rw-r--r-- | src/util/test_common_logging_runtime_loglevels.c | 6 | ||||
-rw-r--r-- | src/util/test_socks.c | 2 |
6 files changed, 19 insertions, 19 deletions
diff --git a/src/util/crypto_abe.c b/src/util/crypto_abe.c index 97ff01680..c089b29db 100644 --- a/src/util/crypto_abe.c +++ b/src/util/crypto_abe.c | |||
@@ -55,7 +55,7 @@ init_aes (element_t k, int enc, | |||
55 | unsigned char*key_buf; | 55 | unsigned char*key_buf; |
56 | 56 | ||
57 | key_len = element_length_in_bytes (k) < 33 ? 3 : element_length_in_bytes (k); | 57 | key_len = element_length_in_bytes (k) < 33 ? 3 : element_length_in_bytes (k); |
58 | key_buf = (unsigned char*) malloc (key_len); | 58 | key_buf = (unsigned char *) malloc (key_len); |
59 | element_to_bytes (key_buf, k); | 59 | element_to_bytes (key_buf, k); |
60 | 60 | ||
61 | GNUNET_memcpy (key->aes_key, | 61 | GNUNET_memcpy (key->aes_key, |
@@ -219,15 +219,15 @@ write_cpabe (void **result, | |||
219 | 219 | ||
220 | *result = GNUNET_malloc (12 + cph_buf_len + aes_buf_len); | 220 | *result = GNUNET_malloc (12 + cph_buf_len + aes_buf_len); |
221 | ptr = *result; | 221 | ptr = *result; |
222 | len = (uint32_t*) ptr; | 222 | len = (uint32_t *) ptr; |
223 | *len = htonl (file_len); | 223 | *len = htonl (file_len); |
224 | ptr += 4; | 224 | ptr += 4; |
225 | len = (uint32_t*) ptr; | 225 | len = (uint32_t *) ptr; |
226 | *len = htonl (aes_buf_len); | 226 | *len = htonl (aes_buf_len); |
227 | ptr += 4; | 227 | ptr += 4; |
228 | GNUNET_memcpy (ptr, aes_buf, aes_buf_len); | 228 | GNUNET_memcpy (ptr, aes_buf, aes_buf_len); |
229 | ptr += aes_buf_len; | 229 | ptr += aes_buf_len; |
230 | len = (uint32_t*) ptr; | 230 | len = (uint32_t *) ptr; |
231 | *len = htonl (cph_buf_len); | 231 | *len = htonl (cph_buf_len); |
232 | ptr += 4; | 232 | ptr += 4; |
233 | GNUNET_memcpy (ptr, cph_buf, cph_buf_len); | 233 | GNUNET_memcpy (ptr, cph_buf, cph_buf_len); |
@@ -246,17 +246,17 @@ read_cpabe (const void *data, | |||
246 | char *ptr; | 246 | char *ptr; |
247 | uint32_t *len; | 247 | uint32_t *len; |
248 | 248 | ||
249 | ptr = (char*) data; | 249 | ptr = (char *) data; |
250 | len = (uint32_t*) ptr; | 250 | len = (uint32_t *) ptr; |
251 | buf_len = ntohl (*len); | 251 | buf_len = ntohl (*len); |
252 | ptr += 4; | 252 | ptr += 4; |
253 | len = (uint32_t*) ptr; | 253 | len = (uint32_t *) ptr; |
254 | *aes_buf_len = ntohl (*len); | 254 | *aes_buf_len = ntohl (*len); |
255 | ptr += 4; | 255 | ptr += 4; |
256 | *aes_buf = GNUNET_malloc (*aes_buf_len); | 256 | *aes_buf = GNUNET_malloc (*aes_buf_len); |
257 | GNUNET_memcpy (*aes_buf, ptr, *aes_buf_len); | 257 | GNUNET_memcpy (*aes_buf, ptr, *aes_buf_len); |
258 | ptr += *aes_buf_len; | 258 | ptr += *aes_buf_len; |
259 | len = (uint32_t*) ptr; | 259 | len = (uint32_t *) ptr; |
260 | *cph_buf_len = ntohl (*len); | 260 | *cph_buf_len = ntohl (*len); |
261 | ptr += 4; | 261 | ptr += 4; |
262 | *cph_buf = GNUNET_malloc (*cph_buf_len); | 262 | *cph_buf = GNUNET_malloc (*cph_buf_len); |
@@ -282,7 +282,7 @@ GNUNET_CRYPTO_cpabe_encrypt (const void *block, | |||
282 | int aes_buf_len; | 282 | int aes_buf_len; |
283 | ssize_t result_len; | 283 | ssize_t result_len; |
284 | 284 | ||
285 | if (! (cph = gabe_enc (key->pub, m, (char*) policy))) | 285 | if (! (cph = gabe_enc (key->pub, m, (char *) policy))) |
286 | return GNUNET_SYSERR; | 286 | return GNUNET_SYSERR; |
287 | cph_buf_len = gabe_cph_serialize (cph, | 287 | cph_buf_len = gabe_cph_serialize (cph, |
288 | &cph_buf); | 288 | &cph_buf); |
@@ -329,7 +329,7 @@ GNUNET_CRYPTO_cpabe_decrypt (const void *block, | |||
329 | } | 329 | } |
330 | gabe_cph_free (cph); | 330 | gabe_cph_free (cph); |
331 | GNUNET_free (cph); | 331 | GNUNET_free (cph); |
332 | plt_len = aes_128_cbc_decrypt (aes_buf, aes_buf_size, m, (char**) result); | 332 | plt_len = aes_128_cbc_decrypt (aes_buf, aes_buf_size, m, (char **) result); |
333 | GNUNET_free (cph_buf); | 333 | GNUNET_free (cph_buf); |
334 | GNUNET_free (aes_buf); | 334 | GNUNET_free (aes_buf); |
335 | element_clear (m); | 335 | element_clear (m); |
diff --git a/src/util/crypto_ecc_dlog.c b/src/util/crypto_ecc_dlog.c index 6b0dc3503..408d64e58 100644 --- a/src/util/crypto_ecc_dlog.c +++ b/src/util/crypto_ecc_dlog.c | |||
@@ -189,7 +189,7 @@ GNUNET_CRYPTO_ecc_dlog_prepare (unsigned int max, | |||
189 | GNUNET_assert (GNUNET_OK == | 189 | GNUNET_assert (GNUNET_OK == |
190 | GNUNET_CONTAINER_multipeermap_put (edc->map, | 190 | GNUNET_CONTAINER_multipeermap_put (edc->map, |
191 | &key, | 191 | &key, |
192 | (void*) (long) i + max, | 192 | (void *) (long) i + max, |
193 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)); | 193 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)); |
194 | } | 194 | } |
195 | /* negative values */ | 195 | /* negative values */ |
@@ -203,7 +203,7 @@ GNUNET_CRYPTO_ecc_dlog_prepare (unsigned int max, | |||
203 | GNUNET_assert (GNUNET_OK == | 203 | GNUNET_assert (GNUNET_OK == |
204 | GNUNET_CONTAINER_multipeermap_put (edc->map, | 204 | GNUNET_CONTAINER_multipeermap_put (edc->map, |
205 | &key, | 205 | &key, |
206 | (void*) (long) max - i, | 206 | (void *) (long) max - i, |
207 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)); | 207 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)); |
208 | } | 208 | } |
209 | gcry_mpi_release (fact); | 209 | gcry_mpi_release (fact); |
diff --git a/src/util/crypto_hash.c b/src/util/crypto_hash.c index 2bf03db58..c41c419ff 100644 --- a/src/util/crypto_hash.c +++ b/src/util/crypto_hash.c | |||
@@ -105,7 +105,7 @@ GNUNET_CRYPTO_hash_from_string2 (const char *enc, | |||
105 | GNUNET_STRINGS_utf8_toupper (enc, up_ptr); | 105 | GNUNET_STRINGS_utf8_toupper (enc, up_ptr); |
106 | 106 | ||
107 | return GNUNET_STRINGS_string_to_data (upper_enc, enclen, | 107 | return GNUNET_STRINGS_string_to_data (upper_enc, enclen, |
108 | (unsigned char*) result, | 108 | (unsigned char *) result, |
109 | sizeof(struct GNUNET_HashCode)); | 109 | sizeof(struct GNUNET_HashCode)); |
110 | } | 110 | } |
111 | 111 | ||
@@ -439,7 +439,7 @@ GNUNET_CRYPTO_hmac (const struct GNUNET_CRYPTO_AuthKey *key, | |||
439 | const void *plaintext, size_t plaintext_len, | 439 | const void *plaintext, size_t plaintext_len, |
440 | struct GNUNET_HashCode *hmac) | 440 | struct GNUNET_HashCode *hmac) |
441 | { | 441 | { |
442 | GNUNET_CRYPTO_hmac_raw ((void*) key->key, sizeof(key->key), | 442 | GNUNET_CRYPTO_hmac_raw ((void *) key->key, sizeof(key->key), |
443 | plaintext, plaintext_len, | 443 | plaintext, plaintext_len, |
444 | hmac); | 444 | hmac); |
445 | } | 445 | } |
diff --git a/src/util/gnunet-resolver.c b/src/util/gnunet-resolver.c index d2f3acd45..6a602c64e 100644 --- a/src/util/gnunet-resolver.c +++ b/src/util/gnunet-resolver.c | |||
@@ -178,7 +178,7 @@ main (int argc, char *const *argv) | |||
178 | GNUNET_PROGRAM_run (argc, argv, "gnunet-resolver [hostname]", | 178 | GNUNET_PROGRAM_run (argc, argv, "gnunet-resolver [hostname]", |
179 | gettext_noop ("Use build-in GNUnet stub resolver"), | 179 | gettext_noop ("Use build-in GNUnet stub resolver"), |
180 | options, &run, NULL)) ? 0 : 1; | 180 | options, &run, NULL)) ? 0 : 1; |
181 | GNUNET_free ((void*) argv); | 181 | GNUNET_free ((void *) argv); |
182 | return ret; | 182 | return ret; |
183 | } | 183 | } |
184 | 184 | ||
diff --git a/src/util/test_common_logging_runtime_loglevels.c b/src/util/test_common_logging_runtime_loglevels.c index 2f5efa198..e6d83d52c 100644 --- a/src/util/test_common_logging_runtime_loglevels.c +++ b/src/util/test_common_logging_runtime_loglevels.c | |||
@@ -207,7 +207,7 @@ read_output_line (int phase_from1, int phase_to1, int phase_from2, | |||
207 | */ | 207 | */ |
208 | #define LOG_MAX_LINE_LENGTH (17) | 208 | #define LOG_MAX_LINE_LENGTH (17) |
209 | 209 | ||
210 | #define LOG_BUFFER_SIZE LOG_MAX_NUM_LINES *LOG_MAX_LINE_LENGTH | 210 | #define LOG_BUFFER_SIZE LOG_MAX_NUM_LINES * LOG_MAX_LINE_LENGTH |
211 | 211 | ||
212 | static char buf[LOG_BUFFER_SIZE]; | 212 | static char buf[LOG_BUFFER_SIZE]; |
213 | 213 | ||
@@ -238,7 +238,7 @@ read_call (void *cls) | |||
238 | read_task = GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, | 238 | read_task = GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, |
239 | stdout_read_handle, | 239 | stdout_read_handle, |
240 | &read_call, | 240 | &read_call, |
241 | (void*) stdout_read_handle); | 241 | (void *) stdout_read_handle); |
242 | return; | 242 | return; |
243 | } | 243 | } |
244 | 244 | ||
@@ -430,7 +430,7 @@ runone () | |||
430 | read_task = GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, | 430 | read_task = GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, |
431 | stdout_read_handle, | 431 | stdout_read_handle, |
432 | &read_call, | 432 | &read_call, |
433 | (void*) stdout_read_handle); | 433 | (void *) stdout_read_handle); |
434 | } | 434 | } |
435 | 435 | ||
436 | 436 | ||
diff --git a/src/util/test_socks.c b/src/util/test_socks.c index f7e0596eb..c5a703db4 100644 --- a/src/util/test_socks.c +++ b/src/util/test_socks.c | |||
@@ -193,7 +193,7 @@ main (int argc, char *argv[]) | |||
193 | "-o", "BatchMode yes", | 193 | "-o", "BatchMode yes", |
194 | "-o", "UserKnownHostsFile /tmp/gnunet_test_socks_ssh_garbage", | 194 | "-o", "UserKnownHostsFile /tmp/gnunet_test_socks_ssh_garbage", |
195 | "-o", "StrictHostKeyChecking no", | 195 | "-o", "StrictHostKeyChecking no", |
196 | "127.0.0.1", "-N", (char*) NULL); | 196 | "127.0.0.1", "-N", (char *) NULL); |
197 | perror ( | 197 | perror ( |
198 | "execlp (\"ssh\",\"ssh\",...,\"-D\",\"1081\",\"127.0.0.1\",\"-N\") "); | 198 | "execlp (\"ssh\",\"ssh\",...,\"-D\",\"1081\",\"127.0.0.1\",\"-N\") "); |
199 | printf ("" | 199 | printf ("" |