mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-14 04:54:37 +03:00
Use #if defined()
syntax when #elif defined()
is present
This prefers the `#if defined()` syntax over the `#ifdef` variant whenever there's also a `#elif defined()` clause, thus making the multiple branching structure more obvious and the overall use more consistent.
This commit is contained in:
2
CRT.c
2
CRT.c
@ -669,7 +669,7 @@ static int stderrRedirectNewFd = -1;
|
||||
static int stderrRedirectBackupFd = -1;
|
||||
|
||||
static int createStderrCacheFile(void) {
|
||||
#ifdef HAVE_MEMFD_CREATE
|
||||
#if defined(HAVE_MEMFD_CREATE)
|
||||
return memfd_create("htop.stderr-redirect", 0);
|
||||
#elif defined(O_TMPFILE)
|
||||
return open("/tmp", O_TMPFILE | O_CREAT | O_EXCL | O_RDWR, S_IRUSR | S_IWUSR);
|
||||
|
Reference in New Issue
Block a user