inline static WRAPPER_DECL NORETURN void
Eexecv(char const *path, char *argv[])
{
- FatalErrnoError(execv(path,argv)==-1, "execv()");
+ execv(path,argv);
+ FatalErrnoErrorFail("execv()");
}
inline static WRAPPER_DECL NORETURN void
Eexecvp(char const *path, char *argv[])
{
- FatalErrnoError(execvp(path,argv)==-1, "execvp()");
+ execvp(path,argv);
+ FatalErrnoErrorFail("execvp()");
}
inline static WRAPPER_DECL void
#include <stdbool.h>
#include <stdio.h>
-static UNUSED void
-FatalErrnoError(bool condition, char const msg[]) /*@*/
+static inline ALWAYSINLINE NORETURN void
+FatalErrnoErrorFail(char const msg[])
{
extern int wrapper_exit_code;
- if (!condition) return;
perror(msg);
-
exit(wrapper_exit_code);
}
+
+static UNUSED void
+FatalErrnoError(bool condition, char const msg[]) /*@*/
+{
+ if (!condition) return;
+ FatalErrnoErrorFail(msg);
+}