include/util.h: Format with clang-format
BRANCH=none
TEST=none
@@ -234,7 +234,6 @@ int alignment_log2(unsigned int x);
*/
void reverse(void *dest, size_t len);
-
/****************************************************************************/
/* Conditional stuff.
*
@@ -261,25 +260,49 @@ typedef uint8_t cond_t;
/* Initialize a conditional to a specific state. Do this first. */
void cond_init(cond_t *c, int boolean);
-static inline void cond_init_false(cond_t *c) { cond_init(c, 0); }
-static inline void cond_init_true(cond_t *c) { cond_init(c, 1); }
+static inline void cond_init_false(cond_t *c)
+{
+ cond_init(c, 0);
+}
+static inline void cond_init_true(cond_t *c)
+{
+ cond_init(c, 1);
+}
/* Set the current state. Do this as often as you like. */
void cond_set(cond_t *c, int boolean);
-static inline void cond_set_false(cond_t *c) { cond_set(c, 0); }
-static inline void cond_set_true(cond_t *c) { cond_set(c, 1); }
+static inline void cond_set_false(cond_t *c)
+{
+ cond_set(c, 0);
+}
+static inline void cond_set_true(cond_t *c)
+{
+ cond_set(c, 1);
+}
/* Get the current state. Do this as often as you like. */
int cond_is(cond_t *c, int boolean);
-static inline int cond_is_false(cond_t *c) { return cond_is(c, 0); }
-static inline int cond_is_true(cond_t *c) { return cond_is(c, 1); }
+static inline int cond_is_false(cond_t *c)
+{
+ return cond_is(c, 0);
+}
+static inline int cond_is_true(cond_t *c)
+{
+ return cond_is(c, 1);
+}
/* See if the state has transitioned. If it has, the corresponding function
* will return true ONCE only, until it's changed back.
*/
int cond_went(cond_t *c, int boolean);
-static inline int cond_went_false(cond_t *c) { return cond_went(c, 0); }
-static inline int cond_went_true(cond_t *c) { return cond_went(c, 1); }
+static inline int cond_went_false(cond_t *c)
+{
+ return cond_went(c, 0);
+}
+static inline int cond_went_true(cond_t *c)
+{
+ return cond_went(c, 1);
+}
/****************************************************************************/
/* Console command parsing */
@@ -287,8 +310,7 @@ static inline int cond_went_true(cond_t *c) { return cond_went(c, 1); }
/* Parse command-line arguments given integer shift value to obtain
* offset and size.
*/
-int parse_offset_size(int argc, char **argv, int shift,
- int *offset, int *size);
+int parse_offset_size(int argc, char **argv, int shift, int *offset, int *size);
/**
* Print binary in hex and ASCII
