summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-05-15 20:16:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:16:44 -0500
commit5b18cf22680c76abb1262a6b75a30b8a37899467 (patch)
treeb845941a1bac81eceaba11c7f885735e1ace20e2 /source4/lib
parent51b0f62b8f0d6350b7706c5b7fd52f856c2756de (diff)
downloadsamba-5b18cf22680c76abb1262a6b75a30b8a37899467.tar.gz
samba-5b18cf22680c76abb1262a6b75a30b8a37899467.tar.bz2
samba-5b18cf22680c76abb1262a6b75a30b8a37899467.zip
r6795: Make some functions static and remove some unused ones.
(This used to be commit 46509eb89980bfe6dabd71264d570ea356ee5a22)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/com/classes/simple.c8
-rw-r--r--source4/lib/registry/common/reg_interface.c7
-rw-r--r--source4/lib/registry/common/reg_util.c38
-rw-r--r--source4/lib/registry/reg_backend_rpc.c2
-rw-r--r--source4/lib/registry/tools/regpatch.c2
-rw-r--r--source4/lib/registry/tools/regshell.c2
-rw-r--r--source4/lib/socket/socket.c6
-rw-r--r--source4/lib/socket/socket.h1
8 files changed, 7 insertions, 59 deletions
diff --git a/source4/lib/com/classes/simple.c b/source4/lib/com/classes/simple.c
index ad03c17cce..e4bf8d18e1 100644
--- a/source4/lib/com/classes/simple.c
+++ b/source4/lib/com/classes/simple.c
@@ -22,8 +22,8 @@
#include "lib/com/com.h"
#include "librpc/gen_ndr/com_dcom.h"
-extern struct IClassFactory_vtable simple_classobject_vtable;
-extern struct IStream_vtable simple_IStream_vtable;
+static struct IClassFactory_vtable simple_classobject_vtable;
+static struct IStream_vtable simple_IStream_vtable;
static WERROR simple_IUnknown_QueryInterface (struct IUnknown *d, TALLOC_CTX *mem_ctx, struct GUID *iid, struct IUnknown **iun)
{
@@ -85,7 +85,7 @@ static uint32_t simpleclass_IUnknown_Release (struct IUnknown *d, TALLOC_CTX *me
}
/* Everything below this line should be autogenerated later on */
-struct IClassFactory_vtable simple_classobject_vtable = {
+static struct IClassFactory_vtable simple_classobject_vtable = {
{},
simpleclass_IUnknown_QueryInterface,
simpleclass_IUnknown_AddRef,
@@ -96,7 +96,7 @@ struct IClassFactory_vtable simple_classobject_vtable = {
NULL
};
-struct IStream_vtable simple_IStream_vtable = {
+static struct IStream_vtable simple_IStream_vtable = {
{},
simple_IUnknown_QueryInterface,
simple_IUnknown_AddRef,
diff --git a/source4/lib/registry/common/reg_interface.c b/source4/lib/registry/common/reg_interface.c
index 407d0d3345..76de2f041f 100644
--- a/source4/lib/registry/common/reg_interface.c
+++ b/source4/lib/registry/common/reg_interface.c
@@ -127,13 +127,6 @@ WERROR reg_get_predefined_key_by_name(struct registry_context *ctx, const char *
return WERR_BADFILE;
}
-WERROR reg_close (struct registry_context *ctx)
-{
- talloc_free(ctx);
-
- return WERR_OK;
-}
-
WERROR reg_get_predefined_key(struct registry_context *ctx, uint32_t hkey, struct registry_key **key)
{
WERROR ret = ctx->get_predefined_key(ctx, hkey, key);
diff --git a/source4/lib/registry/common/reg_util.c b/source4/lib/registry/common/reg_util.c
index d4fdc59d70..e12cff186a 100644
--- a/source4/lib/registry/common/reg_util.c
+++ b/source4/lib/registry/common/reg_util.c
@@ -139,44 +139,6 @@ BOOL reg_string_to_val(TALLOC_CTX *mem_ctx, const char *type_str, const char *da
return True;
}
-WERROR reg_key_get_subkey_val(TALLOC_CTX *mem_ctx, struct registry_key *key, const char *subname, const char *valname, struct registry_value **val)
-{
- struct registry_key *k;
- WERROR error = reg_key_get_subkey_by_name(mem_ctx, key, subname, &k);
- if(!W_ERROR_IS_OK(error)) return error;
-
- return reg_key_get_value_by_name(mem_ctx, k, valname, val);
-}
-
-/***********************************************************************
- Utility function for splitting the base path of a registry path off
- by setting base and new_path to the apprapriate offsets withing the
- path.
-
- WARNING!! Does modify the original string!
- ***********************************************************************/
-
-BOOL reg_split_path( char *path, char **base, char **new_path )
-{
- char *p;
-
- *new_path = *base = NULL;
-
- if ( !path)
- return False;
-
- *base = path;
-
- p = strchr( path, '\\' );
-
- if ( p ) {
- *p = '\0';
- *new_path = p+1;
- }
-
- return True;
-}
-
/**
* Replace all \'s with /'s
*/
diff --git a/source4/lib/registry/reg_backend_rpc.c b/source4/lib/registry/reg_backend_rpc.c
index 5240cf5696..88cce2584e 100644
--- a/source4/lib/registry/reg_backend_rpc.c
+++ b/source4/lib/registry/reg_backend_rpc.c
@@ -77,7 +77,7 @@ struct rpc_key_data {
int max_valdatalen;
};
-struct {
+static struct {
uint32_t hkey;
WERROR (*open) (struct dcerpc_pipe *p, TALLOC_CTX *, struct policy_handle *h);
} known_hives[] = {
diff --git a/source4/lib/registry/tools/regpatch.c b/source4/lib/registry/tools/regpatch.c
index 2462fd8241..aeb418560d 100644
--- a/source4/lib/registry/tools/regpatch.c
+++ b/source4/lib/registry/tools/regpatch.c
@@ -576,7 +576,7 @@ typedef struct command_ops_s {
int (*exec_cmd)(CMD *cmd);
} CMD_OPS;
-CMD_OPS default_cmd_ops[] = {
+static CMD_OPS default_cmd_ops[] = {
{0, regedit4_file_type, regedit4_get_cmd, regedit4_exec_cmd},
{1, editreg_1_0_file_type, editreg_1_0_get_cmd, editreg_1_0_exec_cmd},
{-1, NULL, NULL, NULL}
diff --git a/source4/lib/registry/tools/regshell.c b/source4/lib/registry/tools/regshell.c
index bb7533e55e..ecc2bfc7aa 100644
--- a/source4/lib/registry/tools/regshell.c
+++ b/source4/lib/registry/tools/regshell.c
@@ -187,7 +187,7 @@ static struct registry_key *cmd_exit(TALLOC_CTX *mem_ctx, struct registry_contex
static struct registry_key *cmd_help(TALLOC_CTX *mem_ctx, struct registry_context *ctx,struct registry_key *, int, char **);
-struct {
+static struct {
const char *name;
const char *alias;
const char *help;
diff --git a/source4/lib/socket/socket.c b/source4/lib/socket/socket.c
index 86e2f05962..13d1640f51 100644
--- a/source4/lib/socket/socket.c
+++ b/source4/lib/socket/socket.c
@@ -87,12 +87,6 @@ NTSTATUS socket_create(const char *name, enum socket_type type,
return socket_create_with_ops(NULL, ops, new_sock, type, flags);
}
-void socket_destroy(struct socket_context *sock)
-{
- /* the close is handled by the destructor */
- talloc_free(sock);
-}
-
NTSTATUS socket_connect(struct socket_context *sock,
const char *my_address, int my_port,
const char *server_address, int server_port,
diff --git a/source4/lib/socket/socket.h b/source4/lib/socket/socket.h
index b1fae9ac56..bce64f9f6c 100644
--- a/source4/lib/socket/socket.h
+++ b/source4/lib/socket/socket.h
@@ -107,7 +107,6 @@ struct socket_context {
/* prototypes */
NTSTATUS socket_create(const char *name, enum socket_type type,
struct socket_context **new_sock, uint32_t flags);
-void socket_destroy(struct socket_context *sock);
NTSTATUS socket_connect(struct socket_context *sock,
const char *my_address, int my_port,
const char *server_address, int server_port,