From e6495e6aa500ec28b6e73a81c48bb4a652a7b386 Mon Sep 17 00:00:00 2001 From: Christian Göttsche Date: Thu, 4 Jan 2024 18:24:01 +0100 Subject: pam_unix: enclose macro arguments --- modules/pam_unix/support.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/pam_unix') diff --git a/modules/pam_unix/support.h b/modules/pam_unix/support.h index 81054002..e8f629d7 100644 --- a/modules/pam_unix/support.h +++ b/modules/pam_unix/support.h @@ -31,7 +31,7 @@ typedef struct { * macro to determine if a given flag is on */ -#define on(x,ctrl) (unix_args[x].flag & ctrl) +#define on(x,ctrl) (unix_args[x].flag & (ctrl)) /* * macro to determine that a given flag is NOT on @@ -43,8 +43,8 @@ typedef struct { * macro to turn on/off a ctrl flag manually */ -#define set(x,ctrl) (ctrl = ((ctrl)&unix_args[x].mask)|unix_args[x].flag) -#define unset(x,ctrl) (ctrl &= ~(unix_args[x].flag)) +#define set(x,ctrl) ((ctrl) = ((ctrl)&unix_args[x].mask)|unix_args[x].flag) +#define unset(x,ctrl) ((ctrl) &= ~(unix_args[x].flag)) /* the generic mask */ -- cgit v1.2.3