Mark functions not returning as sudo_noreturn
We also put NOTREACHED where it applies.
This commit is contained in:
@@ -406,6 +406,7 @@ send_mail(const struct eventlog *evlog, const char *message)
|
||||
strerror(errno));
|
||||
sudo_debug_exit(__func__, __FILE__, __LINE__, sudo_debug_subsys);
|
||||
_exit(EXIT_FAILURE);
|
||||
/* NOTREACHED */
|
||||
case 0:
|
||||
/* Grandchild continues below. */
|
||||
sudo_debug_enter(__func__, __FILE__, __LINE__, sudo_debug_subsys);
|
||||
@@ -413,6 +414,7 @@ send_mail(const struct eventlog *evlog, const char *message)
|
||||
default:
|
||||
/* Parent will wait for us. */
|
||||
_exit(EXIT_SUCCESS);
|
||||
/* NOTREACHED */
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -472,7 +474,7 @@ send_mail(const struct eventlog *evlog, const char *message)
|
||||
"unable to fork");
|
||||
sudo_debug_exit(__func__, __FILE__, __LINE__, sudo_debug_subsys);
|
||||
_exit(EXIT_FAILURE);
|
||||
/* NOTREACHED */
|
||||
/* NOTREACHED */
|
||||
case 0:
|
||||
/* Child. */
|
||||
exec_mailer(pfd[0]);
|
||||
|
Reference in New Issue
Block a user