[PATCH 1/3] s3: Add some const to name_mangle()

Volker Lendecke vl at samba.org
Sun Dec 12 10:53:49 MST 2010


---
 source3/include/proto.h |    2 +-
 source3/libsmb/nmblib.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/source3/include/proto.h b/source3/include/proto.h
index e4f9b4a..1fe7f46 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2787,7 +2787,7 @@ struct packet_struct *receive_dgram_packet(int fd, int t,
 bool match_mailslot_name(struct packet_struct *p, const char *mailslot_name);
 int matching_len_bits(unsigned char *p1, unsigned char *p2, size_t len);
 void sort_query_replies(char *data, int n, struct in_addr ip);
-char *name_mangle(TALLOC_CTX *mem_ctx, char *In, char name_type);
+char *name_mangle(TALLOC_CTX *mem_ctx, const char *In, char name_type);
 int name_extract(unsigned char *buf,size_t buf_len, unsigned int ofs, fstring name);
 int name_len(unsigned char *s1, size_t buf_len);
 
diff --git a/source3/libsmb/nmblib.c b/source3/libsmb/nmblib.c
index 943cbcb..e10bd7a 100644
--- a/source3/libsmb/nmblib.c
+++ b/source3/libsmb/nmblib.c
@@ -1293,7 +1293,7 @@ static int name_interpret(unsigned char *buf, size_t buf_len,
  Note:  <Out> must be (33 + strlen(scope) + 2) bytes long, at minimum.
 ****************************************************************************/
 
-char *name_mangle(TALLOC_CTX *mem_ctx, char *In, char name_type)
+char *name_mangle(TALLOC_CTX *mem_ctx, const char *In, char name_type)
 {
 	int   i;
 	int   len;
-- 
1.7.0.4




More information about the samba-technical mailing list