summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-05-10 15:44:59 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-05-10 15:44:59 -0400
commit87d8d5928325f951f40b5f87292a17586b85943b (patch)
treefdfab308274a7046444a8a238baa274153031c12
parent2d6d2f2cf838dc459bc1ef27476a26af5d82a53f (diff)
downloadbfs-87d8d5928325f951f40b5f87292a17586b85943b.tar.xz
config: s/BFS_FALLTHROUGH/fallthru/
-rw-r--r--src/bftw.c2
-rw-r--r--src/config.h6
-rw-r--r--src/eval.c4
-rw-r--r--src/parse.c18
-rw-r--r--src/printf.c2
5 files changed, 16 insertions, 16 deletions
diff --git a/src/bftw.c b/src/bftw.c
index d2f1e36..56701a7 100644
--- a/src/bftw.c
+++ b/src/bftw.c
@@ -758,7 +758,7 @@ static enum bftw_action bftw_call_back(struct bftw_state *state, const char *nam
if ((state->flags & BFTW_PRUNE_MOUNTS) && bftw_is_mount(state, name)) {
return BFTW_PRUNE;
}
- BFS_FALLTHROUGH;
+ fallthru;
case BFTW_PRUNE:
case BFTW_STOP:
return ret;
diff --git a/src/config.h b/src/config.h
index b9f2638..229bafb 100644
--- a/src/config.h
+++ b/src/config.h
@@ -173,11 +173,11 @@
* Silence compiler warnings about switch/case fall-throughs.
*/
#if __has_c_attribute(fallthrough)
-# define BFS_FALLTHROUGH [[fallthrough]]
+# define fallthru [[fallthrough]]
#elif __has_attribute(fallthrough)
-# define BFS_FALLTHROUGH __attribute__((fallthrough))
+# define fallthru __attribute__((fallthrough))
#else
-# define BFS_FALLTHROUGH ((void)0)
+# define fallthru ((void)0)
#endif
/**
diff --git a/src/eval.c b/src/eval.c
index 687ba32..7444ec9 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -241,10 +241,10 @@ bool eval_time(const struct bfs_expr *expr, struct bfs_eval *state) {
switch (expr->time_unit) {
case BFS_DAYS:
diff /= 60*24;
- BFS_FALLTHROUGH;
+ fallthru;
case BFS_MINUTES:
diff /= 60;
- BFS_FALLTHROUGH;
+ fallthru;
case BFS_SECONDS:
break;
}
diff --git a/src/parse.c b/src/parse.c
index 7dd851a..15f38a4 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -1082,16 +1082,16 @@ static struct bfs_expr *parse_time(struct parser_state *state, int field, int ar
switch (*tail) {
case 'w':
time *= 7;
- BFS_FALLTHROUGH;
+ fallthru;
case 'd':
time *= 24;
- BFS_FALLTHROUGH;
+ fallthru;
case 'h':
time *= 60;
- BFS_FALLTHROUGH;
+ fallthru;
case 'm':
time *= 60;
- BFS_FALLTHROUGH;
+ fallthru;
case 's':
break;
default:
@@ -1974,7 +1974,7 @@ static int parse_mode(const struct parser_state *state, const char *mode, struct
case MODE_CLAUSE:
who = 0;
mstate = MODE_WHO;
- BFS_FALLTHROUGH;
+ fallthru;
case MODE_WHO:
switch (*i) {
@@ -2001,7 +2001,7 @@ static int parse_mode(const struct parser_state *state, const char *mode, struct
case MODE_EQUALS:
expr->file_mode &= ~who;
expr->dir_mode &= ~who;
- BFS_FALLTHROUGH;
+ fallthru;
case MODE_PLUS:
expr->file_mode |= file_change;
expr->dir_mode |= dir_change;
@@ -2011,7 +2011,7 @@ static int parse_mode(const struct parser_state *state, const char *mode, struct
expr->dir_mode &= ~dir_change;
break;
}
- BFS_FALLTHROUGH;
+ fallthru;
case MODE_ACTION:
if (who == 0) {
@@ -2093,7 +2093,7 @@ static int parse_mode(const struct parser_state *state, const char *mode, struct
break;
case 'x':
file_change |= who & 0111;
- BFS_FALLTHROUGH;
+ fallthru;
case 'X':
dir_change |= who & 0111;
break;
@@ -2156,7 +2156,7 @@ static struct bfs_expr *parse_perm(struct parser_state *state, int field, int ar
++mode;
break;
}
- BFS_FALLTHROUGH;
+ fallthru;
default:
expr->mode_cmp = BFS_MODE_EQUAL;
break;
diff --git a/src/printf.c b/src/printf.c
index 726d54d..454fbee 100644
--- a/src/printf.c
+++ b/src/printf.c
@@ -680,7 +680,7 @@ int bfs_printf_parse(const struct bfs_ctx *ctx, struct bfs_expr *expr, const cha
case '0':
case '+':
must_be_numeric = true;
- BFS_FALLTHROUGH;
+ fallthru;
case ' ':
case '-':
if (strchr(directive.str, c)) {