summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-id128/sd-id128.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd/sd-id128/sd-id128.c')
-rw-r--r--src/libsystemd/sd-id128/sd-id128.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsystemd/sd-id128/sd-id128.c b/src/libsystemd/sd-id128/sd-id128.c
index 1470e4c01a..9f47d04e61 100644
--- a/src/libsystemd/sd-id128/sd-id128.c
+++ b/src/libsystemd/sd-id128/sd-id128.c
@@ -52,7 +52,6 @@ _public_ int sd_id128_from_string(const char s[], sd_id128_t *ret) {
bool is_guid = false;
assert_return(s, -EINVAL);
- assert_return(ret, -EINVAL);
for (n = 0, i = 0; n < 16;) {
int a, b;
@@ -90,7 +89,8 @@ _public_ int sd_id128_from_string(const char s[], sd_id128_t *ret) {
if (s[i] != 0)
return -EINVAL;
- *ret = t;
+ if (ret)
+ *ret = t;
return 0;
}