convert *_new() functions to return the new object directly
authorDaniel Mack <daniel@zonque.org>
Fri, 31 Oct 2014 09:49:35 +0000 (10:49 +0100)
committerDaniel Mack <daniel@zonque.org>
Fri, 31 Oct 2014 09:49:35 +0000 (10:49 +0100)
commit88d219e62b03a56767b1fb9f41693033701e589e
treeff366af65ec603a03df2b7c1ddf2ff03fb182064
parentf198a45e3242a4825e1e720c0637a151a6ef5e0d
convert *_new() functions to return the new object directly

Al Viro writes:

BTW, the calling conventions for your foo_new() are annoying - instead of
"return -E... or 0, storing the reference to new object in var parameter
passed as the last argument", could you please just return ERR_PTR(-E...)
on error, a pointer to new object on success and to hell with those
struct foo **foo in the argument lists?

Signed-off-by: Daniel Mack <daniel@zonque.org>
21 files changed:
bus.c
bus.h
connection.c
connection.h
domain.c
domain.h
endpoint.c
endpoint.h
handle.c
main.c
match.c
match.h
message.c
message.h
metadata.c
metadata.h
names.c
names.h
notify.c
pool.c
pool.h