浏览代码

clang-format

Schanzenbach, Martin 5 年之前
父节点
当前提交
f9c41505dd

+ 11 - 11
src/reclaim-attribute/plugin_reclaim_attribute_gnuid.c

@@ -50,10 +50,10 @@ gnuid_value_to_string (void *cls,
 
   switch (type)
   {
-  case GNUNET_RECLAIM_ATTRIBUTE_TYPE_STRING:
-    return GNUNET_strndup (data, data_size);
-  default:
-    return NULL;
+    case GNUNET_RECLAIM_ATTRIBUTE_TYPE_STRING:
+      return GNUNET_strndup (data, data_size);
+    default:
+      return NULL;
   }
 }
 
@@ -81,12 +81,12 @@ gnuid_string_to_value (void *cls,
   switch (type)
   {
 
-  case GNUNET_RECLAIM_ATTRIBUTE_TYPE_STRING:
-    *data = GNUNET_strdup (s);
-    *data_size = strlen (s);
-    return GNUNET_OK;
-  default:
-    return GNUNET_SYSERR;
+    case GNUNET_RECLAIM_ATTRIBUTE_TYPE_STRING:
+      *data = GNUNET_strdup (s);
+      *data_size = strlen (s);
+      return GNUNET_OK;
+    default:
+      return GNUNET_SYSERR;
   }
 }
 
@@ -100,7 +100,7 @@ static struct
   const char *name;
   uint32_t number;
 } gnuid_name_map[] = {{"STRING", GNUNET_RECLAIM_ATTRIBUTE_TYPE_STRING},
-                      {NULL, UINT32_MAX}};
+  {NULL, UINT32_MAX}};
 
 
 /**

+ 27 - 27
src/reclaim-attribute/reclaim_attribute.c

@@ -1,22 +1,22 @@
 /*
-      This file is part of GNUnet
-      Copyright (C) 2010-2015 GNUnet e.V.
+   This file is part of GNUnet
+   Copyright (C) 2010-2015 GNUnet e.V.
 
-      GNUnet is free software: you can redistribute it and/or modify it
-      under the terms of the GNU Affero General Public License as published
-      by the Free Software Foundation, either version 3 of the License,
-      or (at your option) any later version.
+   GNUnet is free software: you can redistribute it and/or modify it
+   under the terms of the GNU Affero General Public License as published
+   by the Free Software Foundation, either version 3 of the License,
+   or (at your option) any later version.
 
-      GNUnet is distributed in the hope that it will be useful, but
-      WITHOUT ANY WARRANTY; without even the implied warranty of
-      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-      Affero General Public License for more details.
+   GNUnet is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Affero General Public License for more details.
 
-      You should have received a copy of the GNU Affero General Public License
-      along with this program.  If not, see <http://www.gnu.org/licenses/>.
+   You should have received a copy of the GNU Affero General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-     SPDX-License-Identifier: AGPL3.0-or-later
- */
+   SPDX-License-Identifier: AGPL3.0-or-later
+   */
 
 /**
  * @file reclaim-attribute/reclaim_attribute.c
@@ -265,11 +265,11 @@ GNUNET_RECLAIM_ATTRIBUTE_claim_new (const char *attr_name,
  */
 void
 GNUNET_RECLAIM_ATTRIBUTE_list_add (
-  struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *claim_list,
-  const char *attr_name,
-  uint32_t type,
-  const void *data,
-  size_t data_size)
+                                   struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *claim_list,
+                                   const char *attr_name,
+                                   uint32_t type,
+                                   const void *data,
+                                   size_t data_size)
 {
   struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le;
   le = GNUNET_new (struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry);
@@ -289,7 +289,7 @@ GNUNET_RECLAIM_ATTRIBUTE_list_add (
  */
 size_t
 GNUNET_RECLAIM_ATTRIBUTE_list_serialize_get_size (
-  const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs)
+                                                  const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs)
 {
   struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le;
   size_t len = 0;
@@ -308,8 +308,8 @@ GNUNET_RECLAIM_ATTRIBUTE_list_serialize_get_size (
  */
 size_t
 GNUNET_RECLAIM_ATTRIBUTE_list_serialize (
-  const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs,
-  char *result)
+                                         const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs,
+                                         char *result)
 {
   struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le;
   size_t len;
@@ -373,7 +373,7 @@ GNUNET_RECLAIM_ATTRIBUTE_list_deserialize (const char *data, size_t data_size)
  */
 struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *
 GNUNET_RECLAIM_ATTRIBUTE_list_dup (
-  const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs)
+                                   const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs)
 {
   struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le;
   struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *result_le;
@@ -405,7 +405,7 @@ GNUNET_RECLAIM_ATTRIBUTE_list_dup (
  */
 void
 GNUNET_RECLAIM_ATTRIBUTE_list_destroy (
-  struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs)
+                                       struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs)
 {
   struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le;
   struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *tmp_le;
@@ -429,7 +429,7 @@ GNUNET_RECLAIM_ATTRIBUTE_list_destroy (
  */
 size_t
 GNUNET_RECLAIM_ATTRIBUTE_serialize_get_size (
-  const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr)
+                                             const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr)
 {
   return sizeof (struct Attribute) + strlen (attr->name) + attr->data_size;
 }
@@ -444,8 +444,8 @@ GNUNET_RECLAIM_ATTRIBUTE_serialize_get_size (
  */
 size_t
 GNUNET_RECLAIM_ATTRIBUTE_serialize (
-  const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr,
-  char *result)
+                                    const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr,
+                                    char *result)
 {
   size_t data_len_ser;
   size_t name_len;

+ 1 - 1
src/reclaim-attribute/reclaim_attribute.h

@@ -15,7 +15,7 @@
    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-     SPDX-License-Identifier: AGPL3.0-or-later
+   SPDX-License-Identifier: AGPL3.0-or-later
    */
 /**
  * @author Martin Schanzenbach