diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-05-04 18:40:02 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-05-05 15:08:48 +0200 |
commit | 73ce91a05a63f44367b48a7ef3ca1ce4e85205b3 (patch) | |
tree | 0a15417b3a1d5dde5ac03644c2ca8a77c380f144 /src/test/test-unit-name.c | |
parent | 73e799387f26aacef544d97137826c4760982e12 (diff) | |
download | systemd-73ce91a05a63f44367b48a7ef3ca1ce4e85205b3.tar.gz |
Make unit_name_to_instance() return UnitNameFlags
The function returns non-negative UnitNameFlags on success, and negative
errno on error. In the past we kept the return type as int because of those
negative return values. But nowadays _UNIT_NAME_INVALID == -EINVAL. And if
we tried to actually return something that doesn't fit in the return type,
the compiler would throw an error. By changing to the "real" return type,
we allow the debugger to use symbolic representation for the variables.
Diffstat (limited to 'src/test/test-unit-name.c')
-rw-r--r-- | src/test/test-unit-name.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test-unit-name.c b/src/test/test-unit-name.c index ece78aa548..dc4dc7529d 100644 --- a/src/test/test-unit-name.c +++ b/src/test/test-unit-name.c @@ -471,8 +471,8 @@ static void test_build_parent_slice(void) { } static void test_unit_name_to_instance(void) { + UnitNameFlags r; char *instance; - int r; log_info("/* %s */", __func__); |