git: 92a533ed1d3c - main - id: Fix WITHOUT_AUDIT build
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 02 Nov 2025 13:49:17 UTC
The branch main has been updated by des:
URL: https://cgit.FreeBSD.org/src/commit/?id=92a533ed1d3c81a772815f90cc9aff9237a4429c
commit 92a533ed1d3c81a772815f90cc9aff9237a4429c
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-02 13:48:12 +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
---
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 5f9d2670caa3..7ba07daad11e 100644
--- a/usr.bin/id/id.c
+++ b/usr.bin/id/id.c
@@ -67,19 +67,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();