diff options
author | Volker Lendecke <vl@samba.org> | 2011-02-23 23:17:58 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2011-02-26 12:00:48 +0100 |
commit | 22d8d277c63e13f1e44221829fc3538f63526aa2 (patch) | |
tree | c18075d260e8e9643723c4ed3f083683e2846cfd /lib/nss_wrapper | |
parent | cfffd0f3a011c6963627964b5c0a2460916a9482 (diff) | |
download | samba-22d8d277c63e13f1e44221829fc3538f63526aa2.tar.gz samba-22d8d277c63e13f1e44221829fc3538f63526aa2.tar.bz2 samba-22d8d277c63e13f1e44221829fc3538f63526aa2.zip |
nss_wrapper: Make nwrap_module_init a bit more readable
Diffstat (limited to 'lib/nss_wrapper')
-rw-r--r-- | lib/nss_wrapper/nss_wrapper.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/nss_wrapper/nss_wrapper.c b/lib/nss_wrapper/nss_wrapper.c index 42fc4cfb02..78c51823fd 100644 --- a/lib/nss_wrapper/nss_wrapper.c +++ b/lib/nss_wrapper/nss_wrapper.c @@ -464,6 +464,8 @@ static bool nwrap_module_init(const char *name, int *num_backends, struct nwrap_backend **backends) { + struct nwrap_backend *b; + *backends = (struct nwrap_backend *)realloc(*backends, sizeof(struct nwrap_backend) * ((*num_backends) + 1)); if (!*backends) { @@ -472,11 +474,13 @@ static bool nwrap_module_init(const char *name, return false; } - (*backends)[*num_backends].name = name; - (*backends)[*num_backends].ops = ops; - (*backends)[*num_backends].so_path = so_path; - (*backends)[*num_backends].so_handle = nwrap_load_module(so_path); - (*backends)[*num_backends].fns = nwrap_load_module_fns(&((*backends)[*num_backends])); + b = &((*backends)[*num_backends]); + + b->name = name; + b->ops = ops; + b->so_path = so_path; + b->so_handle = nwrap_load_module(so_path); + b->fns = nwrap_load_module_fns(b); (*num_backends)++; |