summaryrefslogtreecommitdiffstats
path: root/src/basic/unit-name.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-01-07 17:48:28 +0100
committerLennart Poettering <lennart@poettering.net>2019-01-07 17:50:39 +0100
commitbe0b7a1a66fd269b644124c4633088ab2224d1fb (patch)
tree19509e48aec9682426a660b05d99f6e0b466b799 /src/basic/unit-name.h
parentjson: handle NULL explicitly in json_variant_has_type() (diff)
downloadsystemd-be0b7a1a66fd269b644124c4633088ab2224d1fb.tar.xz
systemd-be0b7a1a66fd269b644124c4633088ab2224d1fb.zip
tree-wide: always declare bitflag enums the same way
let's always use the 1 << x syntax. No change of behaviour or even of the compiled binary.
Diffstat (limited to 'src/basic/unit-name.h')
-rw-r--r--src/basic/unit-name.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/basic/unit-name.h b/src/basic/unit-name.h
index d373f03aca..0629db3f67 100644
--- a/src/basic/unit-name.h
+++ b/src/basic/unit-name.h
@@ -9,9 +9,9 @@
#define UNIT_NAME_MAX 256
typedef enum UnitNameFlags {
- UNIT_NAME_PLAIN = 1, /* Allow foo.service */
- UNIT_NAME_INSTANCE = 2, /* Allow foo@bar.service */
- UNIT_NAME_TEMPLATE = 4, /* Allow foo@.service */
+ UNIT_NAME_PLAIN = 1 << 0, /* Allow foo.service */
+ UNIT_NAME_INSTANCE = 1 << 1, /* Allow foo@bar.service */
+ UNIT_NAME_TEMPLATE = 1 << 2, /* Allow foo@.service */
UNIT_NAME_ANY = UNIT_NAME_PLAIN|UNIT_NAME_INSTANCE|UNIT_NAME_TEMPLATE,
} UnitNameFlags;
@@ -50,8 +50,8 @@ int unit_name_from_path_instance(const char *prefix, const char *path, const cha
int unit_name_to_path(const char *name, char **ret);
typedef enum UnitNameMangle {
- UNIT_NAME_MANGLE_GLOB = 1,
- UNIT_NAME_MANGLE_WARN = 2,
+ UNIT_NAME_MANGLE_GLOB = 1 << 0,
+ UNIT_NAME_MANGLE_WARN = 1 << 1,
} UnitNameMangle;
int unit_name_mangle_with_suffix(const char *name, UnitNameMangle flags, const char *suffix, char **ret);