diff options
author | Michal Zidek <mzidek@redhat.com> | 2013-11-07 14:37:19 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-11-27 11:27:49 +0100 |
commit | 05bbf81c6b7e0c0ddb7a9d1c66ad2e19e9e3b6c9 (patch) | |
tree | 0d3f284eb0d8b8dff833f09a9df547a3b8b945c3 /src/db/sysdb.c | |
parent | 19d56eacc786d83fcea1805743370c53098ef552 (diff) | |
download | sssd-05bbf81c6b7e0c0ddb7a9d1c66ad2e19e9e3b6c9.tar.gz sssd-05bbf81c6b7e0c0ddb7a9d1c66ad2e19e9e3b6c9.tar.xz sssd-05bbf81c6b7e0c0ddb7a9d1c66ad2e19e9e3b6c9.zip |
Fix parameter name.
We use '_' as prefix for output parameters. In function
sysdb_get_rdn we wrongly used this prefix for input
parameter, which caused some confusion when reading
the code.
Diffstat (limited to 'src/db/sysdb.c')
-rw-r--r-- | src/db/sysdb.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/db/sysdb.c b/src/db/sysdb.c index 66836a685..283dabd00 100644 --- a/src/db/sysdb.c +++ b/src/db/sysdb.c @@ -218,10 +218,10 @@ struct ldb_dn *sysdb_netgroup_base_dn(TALLOC_CTX *mem_ctx, } errno_t sysdb_get_rdn(struct sysdb_ctx *sysdb, TALLOC_CTX *mem_ctx, - const char *_dn, char **_name, char **_val) + const char *dn, char **_name, char **_val) { errno_t ret; - struct ldb_dn *dn; + struct ldb_dn *ldb_dn; const char *attr_name = NULL; const struct ldb_val *val; TALLOC_CTX *tmp_ctx; @@ -234,14 +234,14 @@ errno_t sysdb_get_rdn(struct sysdb_ctx *sysdb, TALLOC_CTX *mem_ctx, return ENOMEM; } - dn = ldb_dn_new_fmt(tmp_ctx, sysdb->ldb, "%s", _dn); - if (dn == NULL) { + ldb_dn = ldb_dn_new_fmt(tmp_ctx, sysdb->ldb, "%s", dn); + if (ldb_dn == NULL) { ret = ENOMEM; goto done; } if (_name) { - attr_name = ldb_dn_get_rdn_name(dn); + attr_name = ldb_dn_get_rdn_name(ldb_dn); if (attr_name == NULL) { ret = EINVAL; goto done; @@ -254,7 +254,7 @@ errno_t sysdb_get_rdn(struct sysdb_ctx *sysdb, TALLOC_CTX *mem_ctx, } } - val = ldb_dn_get_rdn_val(dn); + val = ldb_dn_get_rdn_val(ldb_dn); if (val == NULL) { ret = EINVAL; if (_name) talloc_free(*_name); @@ -276,9 +276,9 @@ done: } errno_t sysdb_group_dn_name(struct sysdb_ctx *sysdb, TALLOC_CTX *mem_ctx, - const char *_dn, char **_name) + const char *dn, char **_name) { - return sysdb_get_rdn(sysdb, mem_ctx, _dn, NULL, _name); + return sysdb_get_rdn(sysdb, mem_ctx, dn, NULL, _name); } struct ldb_dn *sysdb_domain_dn(TALLOC_CTX *mem_ctx, |