libc!setmode.c: Avoid #if inside macro call
#if inside macro call is undefined behaviour under the C standard (3.8.3 paragraph 10 for C90, 6.8.10 paragraph 11 for C99). The same effect can be achieved with a slightly more verbose construct, putting the whole macro call inside the #ifdef/#else/#endif.
This commit is contained in:
parent
3b82f9106d
commit
6d8d7a88b2
1 changed files with 3 additions and 3 deletions
|
@ -236,11 +236,11 @@ setmode(p)
|
|||
goto out;
|
||||
}
|
||||
perm = (mode_t)lval;
|
||||
ADDCMD('=', (STANDARD_BITS
|
||||
#ifdef S_ISTXT
|
||||
|S_ISTXT
|
||||
ADDCMD('=', (STANDARD_BITS|S_ISTXT), perm, mask);
|
||||
#else
|
||||
ADDCMD('=', (STANDARD_BITS), perm, mask);
|
||||
#endif
|
||||
), perm, mask);
|
||||
set->cmd = 0;
|
||||
return (saveset);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue