From e3a69b62f532a5ac4990d529e015683108155a98 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sat, 20 Jan 2018 17:55:51 +0000 Subject: [PATCH] Use bitfield macros for acl-where --- src/src/acl.c | 290 +++++++++++++++++++++++------------------------ src/src/macros.h | 25 ++++ 2 files changed, 167 insertions(+), 148 deletions(-) diff --git a/src/src/acl.c b/src/src/acl.c index 7d54cdd52..f01f5cf3c 100644 --- a/src/src/acl.c +++ b/src/src/acl.c @@ -37,13 +37,13 @@ are held as a bitmap. This is to avoid expanding the strings unnecessarily. For the code. */ static int msgcond[] = { - [ACL_ACCEPT] = (1<= CS verify_type_list + sizeof(verify_type_list)) goto BAD_VERIFY; -if (vp->no_options && slash != NULL) +if (vp->no_options && slash) { *log_msgptr = string_sprintf("unexpected '/' found in \"%s\" " "(this verify item has no options)", arg); return ERROR; } -if (!(vp->where_allowed & (1<where_allowed & BIT(where))) { - *log_msgptr = string_sprintf("cannot verify %s in ACL for %s", vp->name, acl_wherenames[where]); + *log_msgptr = string_sprintf("cannot verify %s in ACL for %s", + vp->name, acl_wherenames[where]); return ERROR; } switch(vp->value) @@ -3742,7 +3736,7 @@ present. */ if (*epp && rc == OK) user_message = NULL; -if (((1<