summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/eval.c2
-rw-r--r--src/parse.c8
-rw-r--r--src/sanity.h4
3 files changed, 7 insertions, 7 deletions
diff --git a/src/eval.c b/src/eval.c
index a4c0c11..6d7afad 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1085,7 +1085,7 @@ bool eval_or(const struct bfs_expr *expr, struct bfs_eval *state) {
* Evaluate the comma operator.
*/
bool eval_comma(const struct bfs_expr *expr, struct bfs_eval *state) {
- bool ret = uninit(ret, false);
+ bool ret uninit(false);
for (struct bfs_expr *child = bfs_expr_children(expr); child; child = child->next) {
ret = eval_expr(child, state);
diff --git a/src/parse.c b/src/parse.c
index 3a78840..5d0f333 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -1891,11 +1891,11 @@ static int parse_mode(const struct bfs_parser *parser, const char *mode, struct
MODE_PLUS,
MODE_MINUS,
MODE_EQUALS,
- } op = uninit(op, MODE_EQUALS);
+ } op uninit(MODE_EQUALS);
- mode_t who = uninit(who, 0);
- mode_t file_change = uninit(file_change, 0);
- mode_t dir_change = uninit(dir_change, 0);
+ mode_t who uninit(0);
+ mode_t file_change uninit(0);
+ mode_t dir_change uninit(0);
const char *i = mode;
while (true) {
diff --git a/src/sanity.h b/src/sanity.h
index 29b3519..423e6ff 100644
--- a/src/sanity.h
+++ b/src/sanity.h
@@ -86,9 +86,9 @@
* Initialize a variable, unless sanitizers would detect uninitialized uses.
*/
#if SANITIZE_MEMORY
-# define uninit(var, value) var
+# define uninit(value)
#else
-# define uninit(var, value) value
+# define uninit(value) = value
#endif
#endif // BFS_SANITY_H