aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-12-14 11:44:43 +0100
committerLennart Poettering <lennart@poettering.net>2018-12-15 12:06:44 +0100
commit4783e5ad3dbacd99e8818440961be1ef179a9373 (patch)
tree1f5c6d3b901e7dffb38ab353819759b333a83ca5 /src/systemd
parentfstab-generator: remove spurious newline (diff)
downloadsystemd-4783e5ad3dbacd99e8818440961be1ef179a9373.tar.gz
systemd-4783e5ad3dbacd99e8818440961be1ef179a9373.tar.bz2
systemd-4783e5ad3dbacd99e8818440961be1ef179a9373.zip
sd-128: base SD_ID128_MAKE() macro on existing SD_ID128_ARRAY() macro
Diffstat (limited to 'src/systemd')
-rw-r--r--src/systemd/sd-id128.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/systemd/sd-id128.h b/src/systemd/sd-id128.h
index 78cf9462b..dcc7e5b36 100644
--- a/src/systemd/sd-id128.h
+++ b/src/systemd/sd-id128.h
@@ -46,14 +46,14 @@ int sd_id128_get_boot_app_specific(sd_id128_t app_id, sd_id128_t *ret);
int sd_id128_get_boot(sd_id128_t *ret);
int sd_id128_get_invocation(sd_id128_t *ret);
-#define SD_ID128_MAKE(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) \
- ((const sd_id128_t) { .bytes = { 0x##v0, 0x##v1, 0x##v2, 0x##v3, 0x##v4, 0x##v5, 0x##v6, 0x##v7, \
- 0x##v8, 0x##v9, 0x##v10, 0x##v11, 0x##v12, 0x##v13, 0x##v14, 0x##v15 }})
-
#define SD_ID128_ARRAY(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) \
{ .bytes = { 0x##v0, 0x##v1, 0x##v2, 0x##v3, 0x##v4, 0x##v5, 0x##v6, 0x##v7, \
0x##v8, 0x##v9, 0x##v10, 0x##v11, 0x##v12, 0x##v13, 0x##v14, 0x##v15 }}
+#define SD_ID128_MAKE(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) \
+ ((const sd_id128_t) SD_ID128_ARRAY(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15))
+
+
/* Note that SD_ID128_FORMAT_VAL will evaluate the passed argument 16
* times. It is hence not a good idea to call this macro with an
* expensive function as parameter or an expression with side