mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
path-lookup: LookupPathsFlags are a flags type, hence define it like one
We shouldn't rely on C's incremental assignment of values of enums for bit fields. That'll work only between the first two flags, but for everything following will break horrible. Hence, let's avoid any ambiguity here, and let's clearly define the flags as shifts of 1.
This commit is contained in:
@@ -28,8 +28,8 @@ typedef struct LookupPaths LookupPaths;
|
||||
#include "macro.h"
|
||||
|
||||
typedef enum LookupPathsFlags {
|
||||
LOOKUP_PATHS_EXCLUDE_GENERATED = 1,
|
||||
LOOKUP_PATHS_TEMPORARY_GENERATED,
|
||||
LOOKUP_PATHS_EXCLUDE_GENERATED = 1 << 0,
|
||||
LOOKUP_PATHS_TEMPORARY_GENERATED = 1 << 1,
|
||||
} LookupPathsFlags;
|
||||
|
||||
struct LookupPaths {
|
||||
|
||||
Reference in New Issue
Block a user