[Mesa-dev] [PATCH mesa] util: remove unnecessary random whitespaces

Eric Engestrom eric.engestrom at intel.com
Tue Oct 23 11:15:11 UTC 2018


Suggested-by: Timothy Arceri <tarceri at itsqueeze.com>
Signed-off-by: Eric Engestrom <eric.engestrom at intel.com>
---
Timothy, I opted to remove them all instead of adding even more, as it
would break again next time something changes (the set_foreach() one was
already broken before my patch for instance) and result in lots of
unnecessary churn for seemingly no gain, and I don't like hiding the
backslash away (it hinders readability).
---
 src/util/hash_table.h | 6 +++---
 src/util/set.h        | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/util/hash_table.h b/src/util/hash_table.h
index b96cd6146960a6a6f8a1..b9c9dfa01aeaa5e9cac1 100644
--- a/src/util/hash_table.h
+++ b/src/util/hash_table.h
@@ -139,9 +139,9 @@ _mesa_fnv32_1a_accumulate_block(uint32_t hash, const void *data, size_t size)
  * an entry's data with the deleted marker), but not against insertion
  * (which may rehash the table, making entry a dangling pointer).
  */
-#define hash_table_foreach(ht, entry)                   \
-   for (struct hash_entry *entry = _mesa_hash_table_next_entry(ht, NULL);  \
-        entry != NULL;                                  \
+#define hash_table_foreach(ht, entry) \
+   for (struct hash_entry *entry = _mesa_hash_table_next_entry(ht, NULL); \
+        entry != NULL; \
         entry = _mesa_hash_table_next_entry(ht, entry))
 
 static inline void
diff --git a/src/util/set.h b/src/util/set.h
index 3c9abfe77128292557ec..4307f4732fd4fde132a0 100644
--- a/src/util/set.h
+++ b/src/util/set.h
@@ -96,9 +96,9 @@ _mesa_set_random_entry(struct set *set,
  * insertion (which may rehash the set, making entry a dangling
  * pointer).
  */
-#define set_foreach(set, entry)                          \
-   for (struct set_entry *entry = _mesa_set_next_entry(set, NULL);  \
-        entry != NULL;                                   \
+#define set_foreach(set, entry) \
+   for (struct set_entry *entry = _mesa_set_next_entry(set, NULL); \
+        entry != NULL; \
         entry = _mesa_set_next_entry(set, entry))
 
 #ifdef __cplusplus
-- 
Cheers,
  Eric



More information about the mesa-dev mailing list