diff options
author | edef <edef@edef.eu> | 2023-10-05 23:03:48 +0000 |
---|---|---|
committer | edef <edef@edef.eu> | 2023-10-11 08:49:32 +0000 |
commit | 89e45f23db7cc2d234a2541561d3294f9d3e4aa1 (patch) | |
tree | 580d454ef79ba73ecefe2629928cda29118ceccb /nixos/modules/security | |
parent | 38b89f26aa960368bd3bcde28d9f5d8a58eca2b9 (diff) |
nixos/modules/security/wrappers: drop dead code
Diffstat (limited to 'nixos/modules/security')
-rw-r--r-- | nixos/modules/security/wrappers/wrapper.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/nixos/modules/security/wrappers/wrapper.c b/nixos/modules/security/wrappers/wrapper.c index cf19c7a4aa459..3277e7ef6f799 100644 --- a/nixos/modules/security/wrappers/wrapper.c +++ b/nixos/modules/security/wrappers/wrapper.c @@ -26,8 +26,6 @@ // 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; @@ -48,12 +46,6 @@ static noreturn void assert_failure(const char *assertion) { 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(); -} - int get_last_cap(unsigned *last_cap) { FILE* file = fopen("/proc/sys/kernel/cap_last_cap", "r"); if (file == NULL) { |