diff options
author | Jeremy Allison <jra@samba.org> | 2011-05-05 11:29:01 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2011-05-05 11:29:01 -0700 |
commit | 9efea96d16a9f9526669e7d9288902a15d0ee549 (patch) | |
tree | e2d18edaacb8391937c2d53b2221dcf321a7f155 /source3 | |
parent | 4f41be356a4e6b311d30de3b2e36e4c33aa72ca3 (diff) | |
download | samba-9efea96d16a9f9526669e7d9288902a15d0ee549.tar.gz samba-9efea96d16a9f9526669e7d9288902a15d0ee549.tar.bz2 samba-9efea96d16a9f9526669e7d9288902a15d0ee549.zip |
More const compiler warning fixes.
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/util_sid.c | 2 | ||||
-rw-r--r-- | source3/nmbd/nmbd_elections.c | 2 | ||||
-rw-r--r-- | source3/nmbd/nmbd_incomingdgrams.c | 20 | ||||
-rw-r--r-- | source3/nmbd/nmbd_packets.c | 10 | ||||
-rw-r--r-- | source3/nmbd/nmbd_processlogon.c | 2 | ||||
-rw-r--r-- | source3/nmbd/nmbd_proto.h | 22 |
6 files changed, 29 insertions, 29 deletions
diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c index ef46a38f8a..f080d3dfb0 100644 --- a/source3/lib/util_sid.c +++ b/source3/lib/util_sid.c @@ -121,7 +121,7 @@ char *sid_binstring_hex(const struct dom_sid *sid) if (!buf) return NULL; sid_linearize(buf, len, sid); - hex_encode(buf, len, &s); + hex_encode((const unsigned char *)buf, len, &s); free(buf); return s; } diff --git a/source3/nmbd/nmbd_elections.c b/source3/nmbd/nmbd_elections.c index 899c273fe0..a7b240f05e 100644 --- a/source3/nmbd/nmbd_elections.c +++ b/source3/nmbd/nmbd_elections.c @@ -258,7 +258,7 @@ static bool win_election(struct work_record *work, int version, Process an incoming election datagram packet. ******************************************************************/ -void process_election(struct subnet_record *subrec, struct packet_struct *p, char *buf) +void process_election(struct subnet_record *subrec, struct packet_struct *p, const char *buf) { struct dgram_packet *dgram = &p->packet.dgram; int version = CVAL(buf,0); diff --git a/source3/nmbd/nmbd_incomingdgrams.c b/source3/nmbd/nmbd_incomingdgrams.c index d3b9d3d439..11f3d43e0c 100644 --- a/source3/nmbd/nmbd_incomingdgrams.c +++ b/source3/nmbd/nmbd_incomingdgrams.c @@ -95,7 +95,7 @@ void tell_become_backup(void) Process an incoming host announcement packet. *******************************************************************/ -void process_host_announce(struct subnet_record *subrec, struct packet_struct *p, char *buf) +void process_host_announce(struct subnet_record *subrec, struct packet_struct *p, const char *buf) { struct dgram_packet *dgram = &p->packet.dgram; int ttl = IVAL(buf,1)/1000; @@ -195,7 +195,7 @@ done: Process an incoming WORKGROUP announcement packet. *******************************************************************/ -void process_workgroup_announce(struct subnet_record *subrec, struct packet_struct *p, char *buf) +void process_workgroup_announce(struct subnet_record *subrec, struct packet_struct *p, const char *buf) { struct dgram_packet *dgram = &p->packet.dgram; int ttl = IVAL(buf,1)/1000; @@ -252,7 +252,7 @@ done: Process an incoming local master browser announcement packet. *******************************************************************/ -void process_local_master_announce(struct subnet_record *subrec, struct packet_struct *p, char *buf) +void process_local_master_announce(struct subnet_record *subrec, struct packet_struct *p, const char *buf) { struct dgram_packet *dgram = &p->packet.dgram; int ttl = IVAL(buf,1)/1000; @@ -367,7 +367,7 @@ done: ******************************************************************/ void process_master_browser_announce(struct subnet_record *subrec, - struct packet_struct *p,char *buf) + struct packet_struct *p,const char *buf) { unstring local_master_name; struct work_record *work; @@ -418,7 +418,7 @@ done: Process an incoming LanMan host announcement packet. *******************************************************************/ -void process_lm_host_announce(struct subnet_record *subrec, struct packet_struct *p, char *buf, int len) +void process_lm_host_announce(struct subnet_record *subrec, struct packet_struct *p, const char *buf, int len) { struct dgram_packet *dgram = &p->packet.dgram; uint32 servertype = IVAL(buf,1); @@ -431,7 +431,7 @@ void process_lm_host_announce(struct subnet_record *subrec, struct packet_struct unstring work_name; unstring source_name; fstring comment; - char *s = get_safe_str_ptr(buf,len,buf,9); + char *s = get_safe_str_ptr(buf,len,discard_const_p(char, buf),9); START_PROFILE(lm_host_announce); if (!s) { @@ -641,7 +641,7 @@ static void send_backup_list_response(struct subnet_record *subrec, ********************************************************************/ void process_get_backup_list_request(struct subnet_record *subrec, - struct packet_struct *p,char *buf) + struct packet_struct *p,const char *buf) { struct dgram_packet *dgram = &p->packet.dgram; struct work_record *work; @@ -724,7 +724,7 @@ done: ******************************************************************/ void process_reset_browser(struct subnet_record *subrec, - struct packet_struct *p,char *buf) + struct packet_struct *p,const char *buf) { struct dgram_packet *dgram = &p->packet.dgram; int state = CVAL(buf,0); @@ -776,7 +776,7 @@ request from %s IP %s state=0x%X\n", announcement is needed soon. ******************************************************************/ -void process_announce_request(struct subnet_record *subrec, struct packet_struct *p, char *buf) +void process_announce_request(struct subnet_record *subrec, struct packet_struct *p, const char *buf) { struct dgram_packet *dgram = &p->packet.dgram; struct work_record *work; @@ -817,7 +817,7 @@ done: through the "lm announce" parameter in smb.conf) ******************************************************************/ -void process_lm_announce_request(struct subnet_record *subrec, struct packet_struct *p, char *buf, int len) +void process_lm_announce_request(struct subnet_record *subrec, struct packet_struct *p, const char *buf, int len) { struct dgram_packet *dgram = &p->packet.dgram; unstring workgroup_name; diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c index 2817ea80be..36ec13f295 100644 --- a/source3/nmbd/nmbd_packets.c +++ b/source3/nmbd/nmbd_packets.c @@ -108,7 +108,7 @@ void set_nb_flags(char *buf, uint16 nb_flags) Dumps out the browse packet data. **************************************************************************/ -static void debug_browse_data(char *outbuf, int len) +static void debug_browse_data(const char *outbuf, int len) { int i,j; @@ -1062,7 +1062,7 @@ static struct subnet_record *find_subnet_for_dgram_browse_packet(struct packet_s Dispatch a browse frame from port 138 to the correct processing function. ****************************************************************************/ -static void process_browse_packet(struct packet_struct *p, char *buf,int len) +static void process_browse_packet(struct packet_struct *p, const char *buf,int len) { struct dgram_packet *dgram = &p->packet.dgram; int command = CVAL(buf,0); @@ -1149,7 +1149,7 @@ command code %d from %s IP %s to %s\n", subrec->subnet_name, command, nmb_namest Dispatch a LanMan browse frame from port 138 to the correct processing function. ****************************************************************************/ -static void process_lanman_packet(struct packet_struct *p, char *buf,int len) +static void process_lanman_packet(struct packet_struct *p, const char *buf,int len) { struct dgram_packet *dgram = &p->packet.dgram; int command = SVAL(buf,0); @@ -1216,8 +1216,8 @@ static bool listening(struct packet_struct *p,struct nmb_name *nbname) static void process_dgram(struct packet_struct *p) { - char *buf; - char *buf2; + const char *buf; + const char *buf2; int len; struct dgram_packet *dgram = &p->packet.dgram; diff --git a/source3/nmbd/nmbd_processlogon.c b/source3/nmbd/nmbd_processlogon.c index 7976817664..9bb1252a46 100644 --- a/source3/nmbd/nmbd_processlogon.c +++ b/source3/nmbd/nmbd_processlogon.c @@ -304,7 +304,7 @@ static void nmbd_proxy_logon_done(struct tevent_req *subreq) Process a domain logon packet **************************************************************************/ -void process_logon_packet(struct packet_struct *p, char *buf,int len, +void process_logon_packet(struct packet_struct *p, const char *buf,int len, const char *mailslot) { fstring source_name; diff --git a/source3/nmbd/nmbd_proto.h b/source3/nmbd/nmbd_proto.h index b58ca41e5a..1c6ec0cfe4 100644 --- a/source3/nmbd/nmbd_proto.h +++ b/source3/nmbd/nmbd_proto.h @@ -48,7 +48,7 @@ void sync_all_dmbs(time_t t); void check_master_browser_exists(time_t t); void run_elections(time_t t); -void process_election(struct subnet_record *subrec, struct packet_struct *p, char *buf); +void process_election(struct subnet_record *subrec, struct packet_struct *p, const char *buf); bool check_elections(void); void nmbd_message_election(struct messaging_context *msg, void *private_data, @@ -59,18 +59,18 @@ void nmbd_message_election(struct messaging_context *msg, /* The following definitions come from nmbd/nmbd_incomingdgrams.c */ void tell_become_backup(void); -void process_host_announce(struct subnet_record *subrec, struct packet_struct *p, char *buf); -void process_workgroup_announce(struct subnet_record *subrec, struct packet_struct *p, char *buf); -void process_local_master_announce(struct subnet_record *subrec, struct packet_struct *p, char *buf); +void process_host_announce(struct subnet_record *subrec, struct packet_struct *p, const char *buf); +void process_workgroup_announce(struct subnet_record *subrec, struct packet_struct *p, const char *buf); +void process_local_master_announce(struct subnet_record *subrec, struct packet_struct *p, const char *buf); void process_master_browser_announce(struct subnet_record *subrec, - struct packet_struct *p,char *buf); -void process_lm_host_announce(struct subnet_record *subrec, struct packet_struct *p, char *buf, int len); + struct packet_struct *p,const char *buf); +void process_lm_host_announce(struct subnet_record *subrec, struct packet_struct *p, const char *buf, int len); void process_get_backup_list_request(struct subnet_record *subrec, - struct packet_struct *p,char *buf); + struct packet_struct *p,const char *buf); void process_reset_browser(struct subnet_record *subrec, - struct packet_struct *p,char *buf); -void process_announce_request(struct subnet_record *subrec, struct packet_struct *p, char *buf); -void process_lm_announce_request(struct subnet_record *subrec, struct packet_struct *p, char *buf, int len); + struct packet_struct *p,const char *buf); +void process_announce_request(struct subnet_record *subrec, struct packet_struct *p, const char *buf); +void process_lm_announce_request(struct subnet_record *subrec, struct packet_struct *p, const char *buf, int len); /* The following definitions come from nmbd/nmbd_incomingrequests.c */ @@ -250,7 +250,7 @@ bool send_mailslot(bool unique, const char *mailslot,char *buf, size_t len, bool initialize_nmbd_proxy_logon(void); -void process_logon_packet(struct packet_struct *p, char *buf,int len, +void process_logon_packet(struct packet_struct *p, const char *buf,int len, const char *mailslot); /* The following definitions come from nmbd/nmbd_responserecordsdb.c */ |