summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-09 08:35:51 -0500
committerSimo Sorce <simo@redhat.com>2013-01-09 10:18:20 -0500
commit480195bd70467bf05e2fd92cf25cec822a670ced (patch)
tree58496197d5c3588d97835f62ee77617a22d2b1d4
parentd698499602461b98fd56f2d550f80c6cb25f12a9 (diff)
downloadsssd-480195bd70467bf05e2fd92cf25cec822a670ced.tar.gz
sssd-480195bd70467bf05e2fd92cf25cec822a670ced.tar.xz
sssd-480195bd70467bf05e2fd92cf25cec822a670ced.zip
Revert "Add a default section to a switch-statement"
This reverts commit d698499602461b98fd56f2d550f80c6cb25f12a9. And adds the correct fix. Also makes the function static,as it is used nowehere else.
-rw-r--r--src/tools/sss_cache.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/tools/sss_cache.c b/src/tools/sss_cache.c
index 5cced0c2b..748f26833 100644
--- a/src/tools/sss_cache.c
+++ b/src/tools/sss_cache.c
@@ -82,9 +82,9 @@ errno_t init_domains(struct cache_tool_ctx *ctx, const char *domain);
errno_t init_context(int argc, const char *argv[], struct cache_tool_ctx **tctx);
errno_t invalidate_entry(TALLOC_CTX *ctx, struct sysdb_ctx *sysdb,
const char *name, int entry_type);
-bool invalidate_entries(TALLOC_CTX *ctx, struct sysdb_ctx *sysdb,
- enum sss_cache_entry entry_type, const char *filter,
- const char *name);
+static bool invalidate_entries(TALLOC_CTX *ctx, struct sysdb_ctx *sysdb,
+ enum sss_cache_entry entry_type,
+ const char *filter, const char *name);
static errno_t update_all_filters(struct cache_tool_ctx *tctx,
char *domain_name);
@@ -274,16 +274,15 @@ static errno_t update_all_filters(struct cache_tool_ctx *tctx,
return EOK;
}
-
-bool invalidate_entries(TALLOC_CTX *ctx, struct sysdb_ctx *sysdb,
- enum sss_cache_entry entry_type, const char *filter,
- const char *name)
+static bool invalidate_entries(TALLOC_CTX *ctx, struct sysdb_ctx *sysdb,
+ enum sss_cache_entry entry_type,
+ const char *filter, const char *name)
{
const char *attrs[] = {SYSDB_NAME, NULL};
size_t msg_count;
struct ldb_message **msgs;
- const char *type_string = NULL;
- errno_t ret;
+ const char *type_string = "unknown";
+ errno_t ret = EINVAL;
int i;
const char *c_name;
bool iret;
@@ -314,9 +313,6 @@ bool invalidate_entries(TALLOC_CTX *ctx, struct sysdb_ctx *sysdb,
type_string = "autofs map";
ret = search_autofsmaps(ctx, sysdb, filter, attrs, &msg_count, &msgs);
break;
- default:
- DEBUG(SSSDBG_OP_FAILURE, ("Unknown entry type [%d].\n", entry_type));
- return false;
}
if (ret != EOK) {