diff options
author | Thomas Haller <thaller@redhat.com> | 2017-12-11 16:38:42 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-12-15 11:48:38 +0100 |
commit | c696a226ea5410da48677b47b21256987fe8ecd4 (patch) | |
tree | e6c48aa5dd278f42e10f2006ed0c146f001c75f0 /src/nm-audit-manager.c | |
parent | b2273ce3dd13c467be2f5b7bca82ee97b11cf805 (diff) | |
download | NetworkManager-c696a226ea5410da48677b47b21256987fe8ecd4.tar.gz |
all: don't use NM_FLAGS_HAS() with non-constant argument
NM_FLAGS_HAS() uses a static-assert that the second argument is a
single flag (power of two). With a single flag, NM_FLAGS_HAS(),
NM_FLAGS_ANY() and NM_FLAGS_ALL() are all identical.
The second argument must be a compile time constant, and if that is
not the case, one must not use NM_FLAGS_HAS().
Use NM_FLAGS_ANY() in these cases.
Diffstat (limited to 'src/nm-audit-manager.c')
-rw-r--r-- | src/nm-audit-manager.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nm-audit-manager.c b/src/nm-audit-manager.c index 2d75c0e715..45d068f9ae 100644 --- a/src/nm-audit-manager.c +++ b/src/nm-audit-manager.c @@ -123,7 +123,7 @@ build_message (GPtrArray *fields, AuditBackend backend) for (i = 0; i < fields->len; i++) { field = fields->pdata[i]; - if (!NM_FLAGS_HAS (field->backends, backend)) + if (!NM_FLAGS_ANY (field->backends, backend)) continue; if (first) |