From e9ea36e4d2270bd7d32da12ef6d6e2299641582d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 5 Sep 1998 05:07:05 +0000 Subject: 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) --- source3/rpc_parse/parse_reg.c | 71 ------------------------------------------- 1 file changed, 71 deletions(-) (limited to 'source3/rpc_parse/parse_reg.c') diff --git a/source3/rpc_parse/parse_reg.c b/source3/rpc_parse/parse_reg.c index dec5110b41..6b464645e5 100644 --- a/source3/rpc_parse/parse_reg.c +++ b/source3/rpc_parse/parse_reg.c @@ -27,18 +27,6 @@ extern int DEBUGLEVEL; -/******************************************************************* -creates a structure. -********************************************************************/ -void make_reg_q_open_policy(REG_Q_OPEN_POLICY *r_q, - uint16 unknown_0, uint32 level, uint16 unknown_1) -{ - r_q->ptr = 1; - r_q->unknown_0 = unknown_0; - r_q->level = level; - r_q->unknown_1 = unknown_1; -} - /******************************************************************* reads or writes a structure. ********************************************************************/ @@ -61,18 +49,6 @@ void reg_io_q_open_policy(char *desc, REG_Q_OPEN_POLICY *r_q, prs_struct *ps, i } -/******************************************************************* -creates a structure. -********************************************************************/ -void make_reg_r_open_policy(REG_R_OPEN_POLICY *r_r, - POLICY_HND *pol, uint32 status) -{ - if (r_r == NULL) return; - - memcpy(&(r_r->pol), pol, sizeof(r_r->pol)); - r_r->status = status; -} - /******************************************************************* reads or writes a structure. ********************************************************************/ @@ -124,34 +100,6 @@ void reg_io_r_close(char *desc, REG_R_CLOSE *r_u, prs_struct *ps, int depth) prs_uint32("status", ps, depth, &(r_u->status)); } -/******************************************************************* -creates a structure. -********************************************************************/ -void make_reg_q_info(REG_Q_INFO *r_q, - POLICY_HND *pol, char *product_type, - NTTIME *prod_time, uint8 major_version, uint8 minor_version, - uint32 unknown) -{ - int type_len = strlen(product_type); - - memcpy(&(r_q->pol), pol, sizeof(r_q->pol)); - make_uni_hdr(&(r_q->hdr_type), type_len, type_len, 1); - make_unistr2(&(r_q->uni_type), product_type, type_len); - - r_q->ptr1 = 1; - memcpy(&(r_q->time), prod_time, sizeof(r_q->time)); - r_q->major_version1 = major_version; - r_q->minor_version1 = minor_version; - bzero(r_q->pad1, sizeof(r_q->pad1)); - - r_q->ptr2 = 1; - r_q->major_version2 = major_version; - r_q->minor_version2 = minor_version; - bzero(r_q->pad2, sizeof(r_q->pad2)); - - r_q->ptr3 = 1; - r_q->unknown = unknown; -} /******************************************************************* reads or writes a structure. @@ -263,25 +211,6 @@ void reg_io_r_info(char *desc, REG_R_INFO *r_r, prs_struct *ps, int depth) } -/******************************************************************* -creates a structure. -********************************************************************/ -void make_reg_q_open_entry(REG_Q_OPEN_ENTRY *r_q, - POLICY_HND *pol, char *name, - uint32 unknown_0, uint32 unknown_1, uint16 unknown_2) -{ - int len_name = strlen(name); - - memcpy(&(r_q->pol), pol, sizeof(r_q->pol)); - - make_uni_hdr(&(r_q->hdr_name), len_name, len_name, 1); - make_unistr2(&(r_q->uni_name), name, len_name); - - r_q->unknown_0 = unknown_0; - r_q->unknown_1 = unknown_1; - r_q->unknown_2 = unknown_2; -} - /******************************************************************* reads or writes a structure. ********************************************************************/ -- cgit