Use the fallthrough attribute instead of /* FALLTHROUGH */ comments.

This commit is contained in:
Todd C. Miller
2020-08-01 13:10:50 -06:00
parent 20fd3b6363
commit 03ad96e445
29 changed files with 121 additions and 100 deletions

View File

@@ -64,7 +64,7 @@ sudo_conversation(int num_msgs, const struct sudo_conv_message msgs[],
goto read_pass;
case SUDO_CONV_PROMPT_MASK:
SET(flags, TGP_MASK);
/* FALLTHROUGH */
FALLTHROUGH;
case SUDO_CONV_PROMPT_ECHO_OFF:
if (ISSET(msg->msg_type, SUDO_CONV_PROMPT_ECHO_OK))
SET(flags, TGP_NOECHO_TRY);
@@ -84,7 +84,7 @@ sudo_conversation(int num_msgs, const struct sudo_conv_message msgs[],
break;
case SUDO_CONV_ERROR_MSG:
fp = stderr;
/* FALLTHROUGH */
FALLTHROUGH;
case SUDO_CONV_INFO_MSG:
if (msg->msg != NULL) {
size_t len = strlen(msg->msg);
@@ -172,7 +172,7 @@ sudo_conversation_printf(int msg_type, const char *fmt, ...)
switch (msg_type & 0xff) {
case SUDO_CONV_ERROR_MSG:
fp = stderr;
/* FALLTHROUGH */
FALLTHROUGH;
case SUDO_CONV_INFO_MSG:
va_start(ap, fmt);
len = vfprintf(ttyfp ? ttyfp : fp, fmt, ap);