chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
ce06fdf
)
id128: add new sd_id128_is_null() call
author
Lennart Poettering
<lennart@poettering.net>
Mon, 23 Feb 2015 23:10:35 +0000
(
00:10
+0100)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 24 Feb 2015 16:27:53 +0000
(17:27 +0100)
src/systemd/sd-id128.h
patch
|
blob
|
history
diff --git
a/src/systemd/sd-id128.h
b/src/systemd/sd-id128.h
index 48fd87671be807169473494d57788a2610a4a858..9f445278bbf6481399ca9c16d736893bd46c00f6 100644
(file)
--- a/
src/systemd/sd-id128.h
+++ b/
src/systemd/sd-id128.h
@@
-106,6
+106,10
@@
_sd_pure_ static inline int sd_id128_equal(sd_id128_t a, sd_id128_t b) {
return memcmp(&a, &b, 16) == 0;
}
+_sd_pure_ static inline int sd_id128_is_null(sd_id128_t a) {
+ return a.qwords[0] == 0 && a.qwords[1] == 0;
+}
+
#define SD_ID128_NULL ((const sd_id128_t) { .qwords = { 0, 0 }})
_SD_END_DECLARATIONS;