nixos/modules/security/wrappers: drop dead code

edef 89e45f23 38b89f26

Changed files
-8
nixos
modules
security
wrappers
-8
nixos/modules/security/wrappers/wrapper.c
···
// aborts when false, printing the failed expression
#define ASSERT(expr) ((expr) ? (void) 0 : assert_failure(#expr))
-
// aborts when returns non-zero, printing the failed expression and errno
-
#define MUSTSUCCEED(expr) ((expr) ? print_errno_and_die(#expr) : (void) 0)
extern char **environ;
···
static noreturn void assert_failure(const char *assertion) {
fprintf(stderr, "Assertion `%s` in NixOS's wrapper.c failed.\n", assertion);
-
fflush(stderr);
-
abort();
-
}
-
-
static noreturn void print_errno_and_die(const char *assertion) {
-
fprintf(stderr, "Call `%s` in NixOS's wrapper.c failed: %s\n", assertion, strerror(errno));
fflush(stderr);
abort();
}
···
// aborts when false, printing the failed expression
#define ASSERT(expr) ((expr) ? (void) 0 : assert_failure(#expr))
extern char **environ;
···
static noreturn void assert_failure(const char *assertion) {
fprintf(stderr, "Assertion `%s` in NixOS's wrapper.c failed.\n", assertion);
fflush(stderr);
abort();
}