mirror of
https://github.com/samba-team/samba.git
synced 2025-01-25 06:04:04 +03:00
s3:registry: remove unused function regdb_key_is_base_key()
Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Mon Jul 4 21:11:32 CEST 2011 on sn-devel-104
This commit is contained in:
parent
86f8eb98fe
commit
399c0dba01
@ -39,7 +39,6 @@ static struct db_context *regdb = NULL;
|
|||||||
static int regdb_refcount;
|
static int regdb_refcount;
|
||||||
|
|
||||||
static bool regdb_key_exists(struct db_context *db, const char *key);
|
static bool regdb_key_exists(struct db_context *db, const char *key);
|
||||||
static bool regdb_key_is_base_key(const char *key);
|
|
||||||
static WERROR regdb_fetch_keys_internal(struct db_context *db, const char *key,
|
static WERROR regdb_fetch_keys_internal(struct db_context *db, const char *key,
|
||||||
struct regsubkey_ctr *ctr);
|
struct regsubkey_ctr *ctr);
|
||||||
static bool regdb_store_keys_internal(struct db_context *db, const char *key,
|
static bool regdb_store_keys_internal(struct db_context *db, const char *key,
|
||||||
@ -1376,37 +1375,6 @@ static TDB_DATA regdb_fetch_key_internal(struct db_context *db,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* check whether a given key name represents a base key,
|
|
||||||
* i.e one without a subkey separator ('\').
|
|
||||||
*/
|
|
||||||
static bool regdb_key_is_base_key(const char *key)
|
|
||||||
{
|
|
||||||
TALLOC_CTX *mem_ctx = talloc_stackframe();
|
|
||||||
bool ret = false;
|
|
||||||
char *path;
|
|
||||||
|
|
||||||
if (key == NULL) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
path = normalize_reg_path(mem_ctx, key);
|
|
||||||
if (path == NULL) {
|
|
||||||
DEBUG(0, ("out of memory! (talloc failed)\n"));
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (*path == '\0') {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = (strrchr(path, '\\') == NULL);
|
|
||||||
|
|
||||||
done:
|
|
||||||
TALLOC_FREE(mem_ctx);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check for the existence of a key.
|
* Check for the existence of a key.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user