summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Zidek <mzidek@redhat.com>2014-11-24 22:36:48 +0100
committerJakub Hrozek <jhrozek@redhat.com>2014-11-28 16:09:53 +0100
commit4b6fa94d1a00b07c4310678ec721282288a186a0 (patch)
tree686056d500964742eeaa1db870e32ab5b8a8e869
parent466f5a539be1e4c6e7cfb396a2f406e1eb8c428d (diff)
downloadsssd-4b6fa94d1a00b07c4310678ec721282288a186a0.zip
sssd-4b6fa94d1a00b07c4310678ec721282288a186a0.tar.gz
sssd-4b6fa94d1a00b07c4310678ec721282288a186a0.tar.xz
confdb: Make confdb_set_string accept const char pointer
The last parameter (value) in the confdb_set_string is not modified, so it makes sense to make it const to avoid unnecessary warnings or casts. Reviewed-by: Pavel Reichl <preichl@redhat.com>
-rw-r--r--src/confdb/confdb.c2
-rw-r--r--src/confdb/confdb.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/confdb/confdb.c b/src/confdb/confdb.c
index c55a945..2aad30d 100644
--- a/src/confdb/confdb.c
+++ b/src/confdb/confdb.c
@@ -297,7 +297,7 @@ done:
int confdb_set_string(struct confdb_ctx *cdb,
const char *section,
const char *attribute,
- char *val)
+ const char *val)
{
TALLOC_CTX *tmp_ctx;
struct ldb_dn *dn;
diff --git a/src/confdb/confdb.h b/src/confdb/confdb.h
index 159aa9f..b5c4999 100644
--- a/src/confdb/confdb.h
+++ b/src/confdb/confdb.h
@@ -484,7 +484,7 @@ int confdb_get_bool(struct confdb_ctx *cdb,
int confdb_set_string(struct confdb_ctx *cdb,
const char *section,
const char *attribute,
- char *val);
+ const char *val);
/**
* @brief Convenience function to retrieve a single-valued attribute as a