From: Schanzenbach, Martin Date: Sun, 19 Apr 2020 18:30:07 +0000 (+0200) Subject: uncrustify X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c2127bac669d91eb66bea91f5a9e0b27106a9152;p=oweals%2Fgnunet.git uncrustify --- diff --git a/src/revocation/gnunet-revocation.c b/src/revocation/gnunet-revocation.c index 2d83da8b6..16f62de9d 100644 --- a/src/revocation/gnunet-revocation.c +++ b/src/revocation/gnunet-revocation.c @@ -280,7 +280,7 @@ calculate_pow (void *cls) /* store temporary results */ pow_task = NULL; - //if (0 == (rd->pow % 128)) + // if (0 == (rd->pow % 128)) // sync_rd (rd); /* actually do POW calculation */ if (GNUNET_OK == GNUNET_REVOCATION_pow_round (ph)) diff --git a/src/revocation/revocation_api.c b/src/revocation/revocation_api.c index bd0202b67..0361f239b 100644 --- a/src/revocation/revocation_api.c +++ b/src/revocation/revocation_api.c @@ -430,7 +430,8 @@ GNUNET_REVOCATION_check_pow (const struct GNUNET_REVOCATION_Pow *pow, */ for (unsigned int i = 0; i < POW_COUNT; i++) { - for (unsigned int j = i+1; j < POW_COUNT; j++) { + for (unsigned int j = i + 1; j < POW_COUNT; j++) + { if (pow->pow[i] == pow->pow[j]) return GNUNET_NO; } @@ -451,7 +452,7 @@ GNUNET_REVOCATION_check_pow (const struct GNUNET_REVOCATION_Pow *pow, &result); tmp_score = count_leading_zeroes (&result); GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Score %u with %"PRIu64" (#%u)\n", + "Score %u with %" PRIu64 " (#%u)\n", tmp_score, pow_val, i); score += tmp_score; @@ -472,11 +473,11 @@ GNUNET_REVOCATION_pow_init (const struct GNUNET_CRYPTO_EcdsaPublicKey *key, unsigned int difficulty) { struct GNUNET_REVOCATION_PowCalculationHandle*pc; - struct GNUNET_TIME_Absolute ts = GNUNET_TIME_absolute_get(); + struct GNUNET_TIME_Absolute ts = GNUNET_TIME_absolute_get (); pc = GNUNET_new (struct GNUNET_REVOCATION_PowCalculationHandle); pc->pow.key = *key; - pc->pow.timestamp = GNUNET_TIME_absolute_hton(ts); + pc->pow.timestamp = GNUNET_TIME_absolute_hton (ts); pc->current_pow = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, UINT64_MAX); pc->difficulty = difficulty; @@ -533,7 +534,7 @@ GNUNET_REVOCATION_pow_round (struct GNUNET_REVOCATION_PowCalculationHandle *pc) pc->best[i].pow = pc->current_pow; pc->pow.pow[i] = GNUNET_htonll (pc->current_pow); GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "New best score %u with %"PRIu64" (#%u)\n", + "New best score %u with %" PRIu64 " (#%u)\n", zeros, pc->current_pow, i); break; } @@ -568,11 +569,12 @@ GNUNET_REVOCATION_pow_cleanup (struct */ void GNUNET_REVOCATION_sign_revocation (struct GNUNET_REVOCATION_Pow *pow, - const struct GNUNET_CRYPTO_EcdsaPrivateKey *key) + const struct + GNUNET_CRYPTO_EcdsaPrivateKey *key) { pow->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_REVOCATION); pow->purpose.size = htonl (sizeof(struct GNUNET_CRYPTO_EccSignaturePurpose) - + sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey)); + + sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey)); GNUNET_CRYPTO_ecdsa_key_get_public (key, &pow->key); GNUNET_assert (GNUNET_OK == GNUNET_CRYPTO_ecdsa_sign_ (key,