summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorChristopher R. Hertel <crh@samba.org>1998-07-15 20:15:25 +0000
committerChristopher R. Hertel <crh@samba.org>1998-07-15 20:15:25 +0000
commit7ade0aa1d22367cb0d998d35573dc5e333a41f75 (patch)
treeba084f557c9ba0618cf90f48b60c7158bdfca84a /source3/include
parent59d07445b61e26321e3a1770c13756ac5948aabb (diff)
downloadsamba-7ade0aa1d22367cb0d998d35573dc5e333a41f75.tar.gz
samba-7ade0aa1d22367cb0d998d35573dc5e333a41f75.tar.bz2
samba-7ade0aa1d22367cb0d998d35573dc5e333a41f75.zip
util.c: I've added a function called mem_dup(). Similar to strdup(),
mem_dup() allocates the required memory before copying the source data. It returns NULL if memory could not be allcoated, else a pointer to the newly allocated memory. proto.h: Rebuilt to add the prototype for mem_dup(). (This used to be commit 7f7e265ab457d046441d502d4b8447bc2c966675)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/proto.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 6d9d083bc1..ed725b722d 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1582,7 +1582,7 @@ char *namestr(struct nmb_name *n);
struct packet_struct *copy_packet(struct packet_struct *packet);
void free_packet(struct packet_struct *packet);
struct packet_struct *read_packet(int fd,enum packet_type packet_type);
-void make_nmb_name(struct nmb_name *n,char *name,int type,char *this_scope);
+void make_nmb_name( struct nmb_name *n, char *name, int type, char *this_scope );
BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2);
BOOL send_packet(struct packet_struct *p);
struct packet_struct *receive_packet(int fd,enum packet_type type,int t);
@@ -1973,6 +1973,7 @@ BOOL is_a_socket(int fd);
BOOL next_token(char **ptr,char *buff,char *sep);
char **toktocliplist(int *ctok, char *sep);
void *MemMove(void *dest,void *src,int size);
+void *mem_dup( void *from, int size );
void array_promote(char *array,int elsize,int element);
void set_socket_options(int fd, char *options);
void close_sockets(void );