summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabiano Fidêncio <fidencio@redhat.com>2016-11-08 22:05:33 +0100
committerLukas Slebodnik <lslebodn@redhat.com>2017-09-25 21:35:05 +0200
commit3cb4592e27dac8032bd528b6a9f1b49dfa4ec0b8 (patch)
treed9e17e041fb97579431f175eb18237c1257f2f33
parent1ef1056e73e306eb042c4d58f9cfaee621a5cbbe (diff)
downloadsssd-3cb4592e27dac8032bd528b6a9f1b49dfa4ec0b8.tar.gz
sssd-3cb4592e27dac8032bd528b6a9f1b49dfa4ec0b8.tar.xz
sssd-3cb4592e27dac8032bd528b6a9f1b49dfa4ec0b8.zip
SSSCTL: Use get_ prefix for the sssctl_attr_fn functions
As done for the attr_name_fn to avoid "-Wshadow", let's be consistent and do the same for all the other sssctl_attr_fn functions. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
-rw-r--r--src/tools/sssctl/sssctl_cache.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/tools/sssctl/sssctl_cache.c b/src/tools/sssctl/sssctl_cache.c
index 6d06d2c09..80f65bb55 100644
--- a/src/tools/sssctl/sssctl_cache.c
+++ b/src/tools/sssctl/sssctl_cache.c
@@ -31,10 +31,10 @@
#define NOT_FOUND_MSG(obj) _(obj " %s is not present in cache.\n")
#define SSSCTL_CACHE_NAME {_("Name"), SYSDB_NAME, get_attr_name}
-#define SSSCTL_CACHE_CREATE {_("Cache entry creation date"), SYSDB_CREATE_TIME, attr_time}
-#define SSSCTL_CACHE_UPDATE {_("Cache entry last update time"), SYSDB_LAST_UPDATE, attr_time}
-#define SSSCTL_CACHE_EXPIRE {_("Cache entry expiration time"), SYSDB_CACHE_EXPIRE, attr_expire}
-#define SSSCTL_CACHE_IFP {_("Cached in InfoPipe"), SYSDB_IFP_CACHED, attr_yesno}
+#define SSSCTL_CACHE_CREATE {_("Cache entry creation date"), SYSDB_CREATE_TIME, get_attr_time}
+#define SSSCTL_CACHE_UPDATE {_("Cache entry last update time"), SYSDB_LAST_UPDATE, get_attr_time}
+#define SSSCTL_CACHE_EXPIRE {_("Cache entry expiration time"), SYSDB_CACHE_EXPIRE, get_attr_expire}
+#define SSSCTL_CACHE_IFP {_("Cached in InfoPipe"), SYSDB_IFP_CACHED, get_attr_yesno}
#define SSSCTL_CACHE_NULL {NULL, NULL, NULL}
enum cache_object {
@@ -123,11 +123,11 @@ static errno_t get_attr_name(TALLOC_CTX *mem_ctx,
return EOK;
}
-static errno_t attr_time(TALLOC_CTX *mem_ctx,
- struct sysdb_attrs *entry,
- struct sss_domain_info *dom,
- const char *attr,
- const char **_value)
+static errno_t get_attr_time(TALLOC_CTX *mem_ctx,
+ struct sysdb_attrs *entry,
+ struct sss_domain_info *dom,
+ const char *attr,
+ const char **_value)
{
uint32_t value;
errno_t ret;
@@ -140,11 +140,11 @@ static errno_t attr_time(TALLOC_CTX *mem_ctx,
return time_to_string(mem_ctx, value, _value);
}
-static errno_t attr_expire(TALLOC_CTX *mem_ctx,
- struct sysdb_attrs *entry,
- struct sss_domain_info *dom,
- const char *attr,
- const char **_value)
+static errno_t get_attr_expire(TALLOC_CTX *mem_ctx,
+ struct sysdb_attrs *entry,
+ struct sss_domain_info *dom,
+ const char *attr,
+ const char **_value)
{
uint32_t value;
errno_t ret;
@@ -187,11 +187,11 @@ static errno_t attr_initgr(TALLOC_CTX *mem_ctx,
return time_to_string(mem_ctx, value, _value);
}
-static errno_t attr_yesno(TALLOC_CTX *mem_ctx,
- struct sysdb_attrs *entry,
- struct sss_domain_info *dom,
- const char *attr,
- const char **_value)
+static errno_t get_attr_yesno(TALLOC_CTX *mem_ctx,
+ struct sysdb_attrs *entry,
+ struct sss_domain_info *dom,
+ const char *attr,
+ const char **_value)
{
errno_t ret;
bool val;