uncrustify
authorSchanzenbach, Martin <mschanzenbach@posteo.de>
Sun, 19 Apr 2020 18:30:07 +0000 (20:30 +0200)
committerSchanzenbach, Martin <mschanzenbach@posteo.de>
Sun, 19 Apr 2020 18:30:07 +0000 (20:30 +0200)
src/revocation/gnunet-revocation.c
src/revocation/revocation_api.c

index 2d83da8b6ad6170ea75e71eb2634aeea9d71ca16..16f62de9d0fce9f84018207802970741c8b75d7d 100644 (file)
@@ -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))
index bd0202b6716b813763b298f38bbfc3433ecc3710..0361f239b9ef9d65fcadecd9788ec0c20418f1ae 100644 (file)
@@ -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,