summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShirish Kalele <kalele@samba.org>2000-03-10 23:13:11 +0000
committerShirish Kalele <kalele@samba.org>2000-03-10 23:13:11 +0000
commit6ce72c37429c3fc0629fdbd5f5656f07970a8e4a (patch)
treedd3fa977d7c530a214f748406be939a9df5ea816
parentc48579a4fc6c17126712f3a9a9c5212063a6a24d (diff)
downloadsamba-6ce72c37429c3fc0629fdbd5f5656f07970a8e4a.tar.gz
samba-6ce72c37429c3fc0629fdbd5f5656f07970a8e4a.tar.xz
samba-6ce72c37429c3fc0629fdbd5f5656f07970a8e4a.zip
Cleaned up unused variables, returns from non-void functions etc.
-rw-r--r--source/include/proto.h6
-rw-r--r--source/msdfs/msdfs.c2
-rw-r--r--source/msdfs/parse_dfs_map.c14
3 files changed, 5 insertions, 17 deletions
diff --git a/source/include/proto.h b/source/include/proto.h
index d65c5a5d64a..5db9f300d2a 100644
--- a/source/include/proto.h
+++ b/source/include/proto.h
@@ -803,8 +803,6 @@ int share_mode_forall(SHAREMODE_FN(fn));
/*The following definitions come from msdfs/msdfs.c */
-void create_nondfs_path(char* pathname, struct dfs_path* pdp);
-BOOL parse_dfs_path(char* pathname, struct dfs_path* pdp);
BOOL dfs_redirect(char* pathname, connection_struct* conn);
BOOL dfs_findfirst_redirect(char* pathname, connection_struct* conn);
int setup_dfs_referral(char* pathname, int max_referral_level,
@@ -812,7 +810,7 @@ int setup_dfs_referral(char* pathname, int max_referral_level,
int dfs_path_error(char* inbuf, char* outbuf);
int setup_dfs_referral(char* pathname, int max_referral_level,
char** ppdata);
-void unistr_to_dos(char* dst,uint16* src) ;
+void unistr_to_dos(char* dst,char* src) ;
/*The following definitions come from msdfs/msdfs_tdb.c */
@@ -825,9 +823,7 @@ void msdfs_end(void);
/*The following definitions come from msdfs/parse_dfs_map.c */
-BOOL parse_referral(char* s, struct referral* ref);
void load_dfsmaps(void);
-BOOL load_dfsmap(char* fname, int snum);
void load_dfsmaps(void);
/*The following definitions come from nmbd/asyncdns.c */
diff --git a/source/msdfs/msdfs.c b/source/msdfs/msdfs.c
index a78f3618cb0..05e1f221b82 100644
--- a/source/msdfs/msdfs.c
+++ b/source/msdfs/msdfs.c
@@ -198,7 +198,7 @@ int setup_dfs_referral(char* pathname, int max_referral_level,
char* map = lp_dfsmap(lp_servicenumber(dp.servicename));
DEBUG(10,("lp_dfsmap in setup dfs referral: .%s.\n",map ));
- if(map == NULL | *map == '\0')
+ if(map == NULL || (*map == '\0'))
return -1;
}
diff --git a/source/msdfs/parse_dfs_map.c b/source/msdfs/parse_dfs_map.c
index 2db32e21fd3..3680e627c87 100644
--- a/source/msdfs/parse_dfs_map.c
+++ b/source/msdfs/parse_dfs_map.c
@@ -111,9 +111,7 @@ static BOOL parse_referral(char* s, struct referral* ref)
return True;
}
-
-
-BOOL load_dfsmap(char* fname, int snum)
+static BOOL load_dfsmap(char* fname, int snum)
{
struct junction_map* junction = NULL;
struct referral tmp_ref_array[MAX_ALTERNATE_PATHS];
@@ -137,9 +135,6 @@ BOOL load_dfsmap(char* fname, int snum)
{
pstring rawline;
char* line;
- int i;
-
- struct referral* curr_referral_list = NULL;
if(!fgets(rawline,PSTRING_LEN,fp))
continue;
@@ -175,7 +170,7 @@ BOOL load_dfsmap(char* fname, int snum)
if((junction = (struct junction_map*) malloc(sizeof(struct junction_map))) == NULL)
{
DEBUG(0,("Couldn't malloc for Dfs junction_map node\n"));
- return;
+ return False;
}
pstrcpy(junction->service_name,lp_servicename(snum));
pstrcpy(junction->volume_name,line);
@@ -184,13 +179,10 @@ BOOL load_dfsmap(char* fname, int snum)
else
{
/* referral encountered. add to current junction */
- int j=0;
- char* tok;
-
if(!junction)
{
DEBUG(4,("Invalid entry in Dfs map file.\nAlternate path defined outside of a junction in line:\n%s\n",line));
- return;
+ return False;
}
/* parse the referral */