summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-18 15:00:18 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-18 15:00:18 +0200
commitb3b6d8f3f91824df11b3f1e61c8ad443c8c65458 (patch)
tree085753caf5650f5023048063cd5b6e2f2a0ad1d1 /source3
parent593549fc004de05aea23e17c59f9a12254eff33d (diff)
downloadsamba-b3b6d8f3f91824df11b3f1e61c8ad443c8c65458.tar.gz
samba-b3b6d8f3f91824df11b3f1e61c8ad443c8c65458.tar.bz2
samba-b3b6d8f3f91824df11b3f1e61c8ad443c8c65458.zip
Fix const, dupes.
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h2
-rw-r--r--source3/lib/util.c35
2 files changed, 1 insertions, 36 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index cb21f895d1..cab294d8b1 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1237,7 +1237,7 @@ bool file_exist(const char *fname);
bool socket_exist(const char *fname);
time_t file_modtime(const char *fname);
bool directory_exist_stat(char *dname,SMB_STRUCT_STAT *st);
-bool directory_exist(char *dname);
+bool directory_exist(const char *dname);
SMB_OFF_T get_file_size(char *file_name);
char *attrib_string(uint16 mode);
void show_msg(char *buf);
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 2f1dd83bb1..92b818b0aa 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1073,26 +1073,6 @@ static void *realloc_(void *ptr, size_t size)
#endif /* PARANOID_MALLOC_CHECKER */
/****************************************************************************
- Type-safe malloc.
-****************************************************************************/
-
-void *malloc_array(size_t el_size, unsigned int count)
-{
- if (count >= MAX_ALLOC_SIZE/el_size) {
- return NULL;
- }
-
- if (el_size == 0 || count == 0) {
- return NULL;
- }
-#if defined(PARANOID_MALLOC_CHECKER)
- return malloc_(el_size*count);
-#else
- return malloc(el_size*count);
-#endif
-}
-
-/****************************************************************************
Type-safe memalign
****************************************************************************/
@@ -1193,21 +1173,6 @@ void *Realloc(void *p, size_t size, bool free_old_on_error)
}
/****************************************************************************
- Type-safe realloc.
-****************************************************************************/
-
-void *realloc_array(void *p, size_t el_size, unsigned int count, bool free_old_on_error)
-{
- if (count >= MAX_ALLOC_SIZE/el_size) {
- if (free_old_on_error) {
- SAFE_FREE(p);
- }
- return NULL;
- }
- return Realloc(p, el_size*count, free_old_on_error);
-}
-
-/****************************************************************************
(Hopefully) efficient array append.
****************************************************************************/