Fix const, dupes.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 18 Oct 2008 13:00:18 +0000 (15:00 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 18 Oct 2008 13:00:18 +0000 (15:00 +0200)
lib/util/util_net.c
source3/include/proto.h
source3/lib/util.c

index 7718d0208fd0bca1afc051b2d8456ca633224ee2..ee57e9dd230466645ed664d9805f1a81d62d9c59 100644 (file)
@@ -23,6 +23,9 @@
 */
 
 #include "includes.h"
+#include "system/network.h"
+#include "system/locale.h"
+#include "system/filesys.h"
 
 /**
  Interpret an internet address or name into an IP address in 4 byte form.
index cb21f895d15c08ef2ffad8f8a61c6ea84030c55c..cab294d8b1bf5434e78f1d47966bfac652b8b48f 100644 (file)
@@ -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);
index 2f1dd83bb112319a20d8dad418f98bbf129181ce..92b818b0aa82530b6934709deb1f156585c849ff 100644 (file)
@@ -1072,26 +1072,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
 ****************************************************************************/
@@ -1192,21 +1172,6 @@ void *Realloc(void *p, size_t size, bool free_old_on_error)
        return(ret);
 }
 
-/****************************************************************************
- 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.
 ****************************************************************************/