svn commit: samba r13358 - in branches/SAMBA_4_0/source/lib: .

tridge at samba.org tridge at samba.org
Sun Feb 5 23:13:45 GMT 2006


Author: tridge
Date: 2006-02-05 23:13:44 +0000 (Sun, 05 Feb 2006)
New Revision: 13358

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13358

Log:

removed some unused functions and make some local functions static

Modified:
   branches/SAMBA_4_0/source/lib/util.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/util.c
===================================================================
--- branches/SAMBA_4_0/source/lib/util.c	2006-02-05 21:59:50 UTC (rev 13357)
+++ branches/SAMBA_4_0/source/lib/util.c	2006-02-05 23:13:44 UTC (rev 13358)
@@ -132,21 +132,9 @@
 
 
 /*******************************************************************
- Returns the size in bytes of the named file.
-********************************************************************/
-off_t get_file_size(char *file_name)
-{
-	struct stat buf;
-	buf.st_size = 0;
-	if(stat(file_name,&buf) != 0)
-		return (off_t)-1;
-	return(buf.st_size);
-}
-
-/*******************************************************************
  Close the low 3 fd's and open dev/null in their place.
 ********************************************************************/
-void close_low_fds(BOOL stderr_too)
+static void close_low_fds(BOOL stderr_too)
 {
 #ifndef VALGRIND
 	int fd;
@@ -408,17 +396,6 @@
 }
 
 /*******************************************************************
- Set an IP to 0.0.0.0.
-******************************************************************/
-
-void zero_ip(struct ipv4_addr *ip)
-{
-	*ip = sys_inet_makeaddr(0,0);
-	return;
-}
-
-
-/*******************************************************************
  Are two IPs on the same subnet?
 ********************************************************************/
 
@@ -592,37 +569,6 @@
 }
 
 /*****************************************************************
- Get local hostname and cache result.
-*****************************************************************/  
-
-char *myhostname(TALLOC_CTX *mem_ctx)
-{
-	char *myname, *ret;
-	myname = get_myname();
-	ret = talloc_strdup(mem_ctx, myname);
-	free(myname);
-	return ret;
-
-}
-
-/**********************************************************************
- Converts a name to a fully qalified domain name.
-***********************************************************************/
-
-char *name_to_fqdn(TALLOC_CTX *mem_ctx, const char *name)
-{
-	struct hostent *hp = sys_gethostbyname(name);
-	if ( hp && hp->h_name && *hp->h_name ) {
-		DEBUG(10,("name_to_fqdn: lookup for %s -> %s.\n", name, hp->h_name));
-		return talloc_strdup(mem_ctx, hp->h_name);
-	} else {
-		DEBUG(10,("name_to_fqdn: lookup for %s failed.\n", name));
-		return talloc_strdup(mem_ctx, name);
-	}
-}
-
-
-/*****************************************************************
  A useful function for returning a path in the Samba lock directory.
 *****************************************************************/  
 char *lock_path(TALLOC_CTX* mem_ctx, const char *name)
@@ -653,7 +599,7 @@
 /*****************************************************************
  A useful function for returning a path in the Samba piddir directory.
 *****************************************************************/  
-char *pid_path(TALLOC_CTX* mem_ctx, const char *name)
+static char *pid_path(TALLOC_CTX* mem_ctx, const char *name)
 {
 	char *fname, *dname;
 
@@ -732,7 +678,7 @@
 	return fname;
 }
 
-char *modules_path(TALLOC_CTX* mem_ctx, const char *name)
+static char *modules_path(TALLOC_CTX* mem_ctx, const char *name)
 {
 	return talloc_asprintf(mem_ctx, "%s/%s", dyn_MODULESDIR, name);
 }



More information about the samba-cvs mailing list