diff options
author | brian <brian@cvs.openbsd.org> | 2001-01-29 11:41:38 +0000 |
---|---|---|
committer | brian <brian@cvs.openbsd.org> | 2001-01-29 11:41:38 +0000 |
commit | 2ee697bb4fa586292bae27b8170ec1ddbde1c7ba (patch) | |
tree | 55fcaa191f96be31c3e936328261e8ca4f5f7cec /usr.sbin/ppp | |
parent | 0c8cfff2d439422f4267af681365936ae8d8678b (diff) |
Add a few ``const''s to silence some -Wwrite-strings warnings
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r-- | usr.sbin/ppp/ppp/alias_smedia.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/usr.sbin/ppp/ppp/alias_smedia.c b/usr.sbin/ppp/ppp/alias_smedia.c index 7e156ea79bc..adc2ef663eb 100644 --- a/usr.sbin/ppp/ppp/alias_smedia.c +++ b/usr.sbin/ppp/ppp/alias_smedia.c @@ -62,7 +62,7 @@ * Junichi SATOH <junichi@astec.co.jp> * <junichi@junichi.org> * - * $OpenBSD: alias_smedia.c,v 1.3 2000/11/02 00:53:47 brian Exp $ + * $OpenBSD: alias_smedia.c,v 1.4 2001/01/29 11:41:37 brian Exp $ */ /* @@ -115,7 +115,7 @@ #define ISDIGIT(a) (((a) >= '0') && ((a) <= '9')) static int -search_string(char *data, int dlen, char *search_str) +search_string(char *data, int dlen, const char *search_str) { int i, j, k; int search_str_len; @@ -139,7 +139,7 @@ static int alias_rtsp_out(struct ip *pip, struct alias_link *link, char *data, - char *port_str) + const char *port_str) { int hlen, tlen, dlen; struct tcphdr *tc; @@ -147,7 +147,7 @@ alias_rtsp_out(struct ip *pip, u_short p[2], new_len; u_short sport, eport, base_port; u_short salias = 0, ealias = 0, base_alias = 0; - char *transport_str = "transport:"; + const char *transport_str = "transport:"; char newdata[2048], *port_data, *port_newdata, stemp[80]; int links_created = 0, pkt_updated = 0; struct alias_link *rtsp_link = NULL; @@ -341,7 +341,7 @@ alias_pna_out(struct ip *pip, return 0; } if ((ntohs(msg_id) == 1) || (ntohs(msg_id) == 7)) { - memcpy((char*)&port, (char*)work, 2); + memcpy(&port, work, 2); pna_links = FindUdpTcpOut(pip->ip_src, GetDestAddress(link), port, 0, IPPROTO_UDP, 1); if (pna_links != NULL) { @@ -351,7 +351,7 @@ alias_pna_out(struct ip *pip, #endif tc = (struct tcphdr *) ((char *) pip + (pip->ip_hl << 2)); alias_port = GetAliasPort(pna_links); - memcpy((char*)work, (char*)&alias_port, 2); + memcpy(work, &alias_port, 2); /* Compute TCP checksum for revised packet */ tc->th_sum = 0; @@ -369,8 +369,10 @@ AliasHandleRtspOut(struct ip *pip, struct alias_link *link, int maxpacketsize) { int hlen, tlen, dlen; struct tcphdr *tc; - char *data, *setup = "SETUP", *pna = "PNA", *str200 = "200", *okstr = "OK"; - char *client_port_str = "client_port", *server_port_str = "server_port"; + char *data; + const char *setup = "SETUP", *pna = "PNA", *str200 = "200"; + const char *okstr = "OK", *client_port_str = "client_port"; + const char *server_port_str = "server_port"; int i, parseOk; tc = (struct tcphdr *)((char *)pip + (pip->ip_hl << 2)); |