summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/test-bus-zero-copy.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-08-19 19:39:16 +0200
committerLennart Poettering <lennart@poettering.net>2014-08-19 19:39:16 +0200
commit4531a9bc206c0c22e29b56ac4a7528afba2e9c83 (patch)
tree6ea5ee56ccd2d9b16234e83e1326bef649962471 /src/libsystemd/sd-bus/test-bus-zero-copy.c
parent8a0dec98a3d18666da739c984f8952865d6e0ce3 (diff)
memfd: simplify API
Now, that the memfd stuff is not exported anymore, we can simplify a few things: Use assert() instead of assert_return(), since this is used internally only, and we should be less permissive then. No need to pass an allocated fd back by call-by-reference, we can just directly return it.
Diffstat (limited to 'src/libsystemd/sd-bus/test-bus-zero-copy.c')
-rw-r--r--src/libsystemd/sd-bus/test-bus-zero-copy.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsystemd/sd-bus/test-bus-zero-copy.c b/src/libsystemd/sd-bus/test-bus-zero-copy.c
index 1d279e6032..e3010fbf7e 100644
--- a/src/libsystemd/sd-bus/test-bus-zero-copy.c
+++ b/src/libsystemd/sd-bus/test-bus-zero-copy.c
@@ -93,8 +93,8 @@ int main(int argc, char *argv[]) {
memset(p+1, 'L', FIRST_ARRAY-2);
p[FIRST_ARRAY-1] = '>';
- r = memfd_new_and_map(&f, NULL, STRING_SIZE, (void**) &s);
- assert_se(r >= 0);
+ f = memfd_new_and_map(NULL, STRING_SIZE, (void**) &s);
+ assert_se(f >= 0);
s[0] = '<';
for (i = 1; i < STRING_SIZE-2; i++)
@@ -112,8 +112,8 @@ int main(int argc, char *argv[]) {
close(f);
- r = memfd_new_and_map(&f, NULL, SECOND_ARRAY, (void**) &p);
- assert_se(r >= 0);
+ f = memfd_new_and_map(NULL, SECOND_ARRAY, (void**) &p);
+ assert_se(f >= 0);
p[0] = '<';
memset(p+1, 'P', SECOND_ARRAY-2);