git: c64b594a3064 - stable/14 - id: Fix WITHOUT_AUDIT build
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 04 Nov 2025 15:29:41 UTC
The branch stable/14 has been updated by des:
URL: https://cgit.FreeBSD.org/src/commit/?id=c64b594a306480b567ed7132947459af9cc6aec5
commit c64b594a306480b567ed7132947459af9cc6aec5
Author: Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2025-11-02 13:45:12 +0000
Commit: Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2025-11-04 15:29:38 +0000
id: Fix WITHOUT_AUDIT build
Rather than add more ifdefs, trust the compiler to optimize Aflag away.
Fixes: 70b72ede982f ("id: Clean up")
PR: 290740
MFC after: 3 days
(cherry picked from commit 92a533ed1d3c81a772815f90cc9aff9237a4429c)
---
usr.bin/id/id.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/usr.bin/id/id.c b/usr.bin/id/id.c
index 238c6f2bf709..342a891e4165 100644
--- a/usr.bin/id/id.c
+++ b/usr.bin/id/id.c
@@ -79,19 +79,13 @@ main(int argc, char *argv[])
{
struct group *gr;
struct passwd *pw;
-#ifdef USE_BSM_AUDIT
- bool Aflag;
-#endif
- bool Gflag, Mflag, Pflag;
+ bool Aflag, Gflag, Mflag, Pflag;
bool cflag, dflag, gflag, nflag, pflag, rflag, sflag, uflag;
int ch, combo, error, id;
const char *myname, *optstr;
char loginclass[MAXLOGNAME];
-#ifdef USE_BSM_AUDIT
- Aflag = false;
-#endif
- Gflag = Mflag = Pflag = false;
+ Aflag = Gflag = Mflag = Pflag = false;
cflag = dflag = gflag = nflag = pflag = rflag = sflag = uflag = false;
myname = getprogname();