Commit 685704fe authored by Daniel Lenski's avatar Daniel Lenski Committed by David Woodhouse

append_opt() and buf_append_urlencoded() should take const char *

Fixes -Wcast-qual warnings.
Signed-off-by: default avatarDaniel Lenski <dlenski@gmail.com>
Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent 01d40d80
......@@ -62,7 +62,7 @@ int xmlnode_match_prop(xmlNode *xml_node, const char *name, const char *match)
return ret;
}
int append_opt(struct oc_text_buf *body, char *opt, char *name)
int append_opt(struct oc_text_buf *body, const char *opt, const char *name)
{
if (buf_error(body))
return buf_error(body);
......
......@@ -41,7 +41,7 @@ struct oc_text_buf *buf_alloc(void)
return calloc(1, sizeof(struct oc_text_buf));
}
void buf_append_urlencoded(struct oc_text_buf *buf, char *str)
void buf_append_urlencoded(struct oc_text_buf *buf, const char *str)
{
while (str && *str) {
unsigned char c = *str;
......
......@@ -973,7 +973,7 @@ int cstp_obtain_cookie(struct openconnect_info *vpninfo);
int xmlnode_is_named(xmlNode *xml_node, const char *name);
int xmlnode_get_prop(xmlNode *xml_node, const char *name, char **var);
int xmlnode_match_prop(xmlNode *xml_node, const char *name, const char *match);
int append_opt(struct oc_text_buf *body, char *opt, char *name);
int append_opt(struct oc_text_buf *body, const char *opt, const char *name);
int append_form_opts(struct openconnect_info *vpninfo,
struct oc_auth_form *form, struct oc_text_buf *body);
void free_opt(struct oc_form_opt *opt);
......@@ -996,7 +996,7 @@ int buf_append_utf16le(struct oc_text_buf *buf, const char *utf8);
int get_utf8char(const char **utf8);
void buf_append_from_utf16le(struct oc_text_buf *buf, const void *utf16);
void buf_truncate(struct oc_text_buf *buf);
void buf_append_urlencoded(struct oc_text_buf *buf, char *str);
void buf_append_urlencoded(struct oc_text_buf *buf, const char *str);
int buf_error(struct oc_text_buf *buf);
int buf_free(struct oc_text_buf *buf);
char *openconnect_create_useragent(const char *base);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment