summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-02-05 23:13:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:51:49 -0500
commit00c05456657f3219fc903463e57f1d0398232e78 (patch)
treefcc6ddafb14b9882366a1693186d96edfccdc44b /source4
parent5972e0116321b78f0fdb186171c7b901abde11c8 (diff)
downloadsamba-00c05456657f3219fc903463e57f1d0398232e78.tar.gz
samba-00c05456657f3219fc903463e57f1d0398232e78.tar.bz2
samba-00c05456657f3219fc903463e57f1d0398232e78.zip
r13358: removed some unused functions and make some local functions static
(This used to be commit a73b76a36a70703738945d42795da6cf90c85105)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/util.c60
1 files changed, 3 insertions, 57 deletions
diff --git a/source4/lib/util.c b/source4/lib/util.c
index 7d3f21c1e8..17dde332e1 100644
--- a/source4/lib/util.c
+++ b/source4/lib/util.c
@@ -132,21 +132,9 @@ BOOL directory_create_or_exist(const char *dname, uid_t uid,
/*******************************************************************
- 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 @@ BOOL is_zero_ip(struct ipv4_addr ip)
}
/*******************************************************************
- 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 @@ void *memdup(const void *p, size_t size)
}
/*****************************************************************
- 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 @@ char *lock_path(TALLOC_CTX* mem_ctx, const char *name)
/*****************************************************************
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 @@ char *smbd_tmp_path(TALLOC_CTX *mem_ctx, const char *name)
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);
}