summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_rpc.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-09-05 05:07:05 +0000
committerAndrew Tridgell <tridge@samba.org>1998-09-05 05:07:05 +0000
commite9ea36e4d2270bd7d32da12ef6d6e2299641582d (patch)
tree34905bbfb6adde96be7234d122562e678aa6efd8 /source3/rpc_parse/parse_rpc.c
parent766aa4ff5c6007669010d8c284de20111e633b25 (diff)
downloadsamba-e9ea36e4d2270bd7d32da12ef6d6e2299641582d.tar.gz
samba-e9ea36e4d2270bd7d32da12ef6d6e2299641582d.tar.bz2
samba-e9ea36e4d2270bd7d32da12ef6d6e2299641582d.zip
tridge the destroyer returns!
prompted by the interpret_security() dead code that Jean-Francois pointed out I added a make target "finddead" that finds potentially dead (ie. unused) code. It spat out 304 function names ... I went through these are deleted many of them, making others static (finddead also reports functions that are used only in the local file). in doing this I have almost certainly deleted some useful code. I may have even prevented compilation with some compile options. I apologise. I decided it was better to get rid of this code now and add back the one or two functions that are needed than to keep all this baggage. So, if I have done a bit too much "destroying" then let me know. Keep the swearing to a minimum :) One bit I didn't do is the ubibt code. Chris, can you look at that? Heaps of unused functions there. Can they be made static? (This used to be commit 2204475c87f3024ea8fd1fbd7385b2def617a46f)
Diffstat (limited to 'source3/rpc_parse/parse_rpc.c')
-rw-r--r--source3/rpc_parse/parse_rpc.c38
1 files changed, 7 insertions, 31 deletions
diff --git a/source3/rpc_parse/parse_rpc.c b/source3/rpc_parse/parse_rpc.c
index 8a5b6c172e..ac01e7f0b1 100644
--- a/source3/rpc_parse/parse_rpc.c
+++ b/source3/rpc_parse/parse_rpc.c
@@ -184,20 +184,9 @@ void smb_io_rpc_hdr(char *desc, RPC_HDR *rpc, prs_struct *ps, int depth)
}
/*******************************************************************
-creates an RPC_IFACE structure.
-********************************************************************/
-void make_rpc_iface(RPC_IFACE *ifc, char data[16], uint32 version)
-{
- if (ifc == NULL || data == NULL) return;
-
- memcpy(ifc->data, data, sizeof(ifc->data)); /* 16 bytes of number */
- ifc->version = version; /* the interface number */
-}
-
-/*******************************************************************
reads or writes an RPC_IFACE structure.
********************************************************************/
-void smb_io_rpc_iface(char *desc, RPC_IFACE *ifc, prs_struct *ps, int depth)
+static void smb_io_rpc_iface(char *desc, RPC_IFACE *ifc, prs_struct *ps, int depth)
{
if (ifc == NULL) return;
@@ -213,7 +202,7 @@ void smb_io_rpc_iface(char *desc, RPC_IFACE *ifc, prs_struct *ps, int depth)
/*******************************************************************
creates an RPC_ADDR_STR structure.
********************************************************************/
-void make_rpc_addr_str(RPC_ADDR_STR *str, char *name)
+static void make_rpc_addr_str(RPC_ADDR_STR *str, char *name)
{
if (str == NULL || name == NULL) return;
@@ -224,7 +213,7 @@ void make_rpc_addr_str(RPC_ADDR_STR *str, char *name)
/*******************************************************************
reads or writes an RPC_ADDR_STR structure.
********************************************************************/
-void smb_io_rpc_addr_str(char *desc, RPC_ADDR_STR *str, prs_struct *ps, int depth)
+static void smb_io_rpc_addr_str(char *desc, RPC_ADDR_STR *str, prs_struct *ps, int depth)
{
if (str == NULL) return;
@@ -239,7 +228,7 @@ void smb_io_rpc_addr_str(char *desc, RPC_ADDR_STR *str, prs_struct *ps, int dep
/*******************************************************************
creates an RPC_HDR_BBA structure.
********************************************************************/
-void make_rpc_hdr_bba(RPC_HDR_BBA *bba, uint16 max_tsize, uint16 max_rsize, uint32 assoc_gid)
+static void make_rpc_hdr_bba(RPC_HDR_BBA *bba, uint16 max_tsize, uint16 max_rsize, uint32 assoc_gid)
{
if (bba == NULL) return;
@@ -251,7 +240,7 @@ void make_rpc_hdr_bba(RPC_HDR_BBA *bba, uint16 max_tsize, uint16 max_rsize, uint
/*******************************************************************
reads or writes an RPC_HDR_BBA structure.
********************************************************************/
-void smb_io_rpc_hdr_bba(char *desc, RPC_HDR_BBA *rpc, prs_struct *ps, int depth)
+static void smb_io_rpc_hdr_bba(char *desc, RPC_HDR_BBA *rpc, prs_struct *ps, int depth)
{
if (rpc == NULL) return;
@@ -312,7 +301,7 @@ creates an RPC_RESULTS structure.
lkclXXXX only one reason at the moment!
********************************************************************/
-void make_rpc_results(RPC_RESULTS *res,
+static void make_rpc_results(RPC_RESULTS *res,
uint8 num_results, uint16 result, uint16 reason)
{
if (res == NULL) return;
@@ -328,7 +317,7 @@ reads or writes an RPC_RESULTS structure.
lkclXXXX only one reason at the moment!
********************************************************************/
-void smb_io_rpc_results(char *desc, RPC_RESULTS *res, prs_struct *ps, int depth)
+static void smb_io_rpc_results(char *desc, RPC_RESULTS *res, prs_struct *ps, int depth)
{
if (res == NULL) return;
@@ -411,19 +400,6 @@ void smb_io_rpc_hdr_req(char *desc, RPC_HDR_REQ *rpc, prs_struct *ps, int depth
}
/*******************************************************************
-creates an RPC_HDR_RESP structure.
-********************************************************************/
-void make_rpc_hdr_resp(RPC_HDR_RESP *hdr, uint32 data_len)
-{
- if (hdr == NULL) return;
-
- hdr->alloc_hint = data_len - 0x18; /* allocation hint */
- hdr->context_id = 0; /* presentation context identifier */
- hdr->cancel_count = 0; /* cancel count */
- hdr->reserved = 0; /* 0 - reserved */
-}
-
-/*******************************************************************
reads or writes an RPC_HDR_RESP structure.
********************************************************************/
void smb_io_rpc_hdr_resp(char *desc, RPC_HDR_RESP *rpc, prs_struct *ps, int depth)