diff options
author | Dan Winship <danw@gnome.org> | 2013-10-10 09:31:23 -0400 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2013-10-10 09:33:26 -0400 |
commit | e5fbda83f6045a610054b179ae60fc062bded101 (patch) | |
tree | 2e95d49c9556b465b944e96447fd3943a3d37349 /libsoup/soup-request-data.c | |
parent | 1e0656f8ceb6fb1eb019f3b083d3dfe610032b68 (diff) | |
download | libsoup-e5fbda83f6045a610054b179ae60fc062bded101.tar.gz |
soup-uri: minor code reorg/renaming
Change uri_decoded_copy() to strdup the input string *after* doing its
g_return_val_if_fail(), to avoid pointlessly confusing code analyzers.
Also, rename the function to soup_uri_decoded_copy(), since it's used
from soup-request-data.c too and it's been annoying me that it was
non-namespaced.
https://bugzilla.gnome.org/show_bug.cgi?id=709793
Diffstat (limited to 'libsoup/soup-request-data.c')
-rw-r--r-- | libsoup/soup-request-data.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libsoup/soup-request-data.c b/libsoup/soup-request-data.c index 246854a7..678e84da 100644 --- a/libsoup/soup-request-data.c +++ b/libsoup/soup-request-data.c @@ -96,7 +96,7 @@ soup_request_data_send (SoupRequest *request, end = comma; if (end != start) - data->priv->content_type = uri_decoded_copy (start, end - start, NULL); + data->priv->content_type = soup_uri_decoded_copy (start, end - start, NULL); } memstream = g_memory_input_stream_new (); @@ -106,7 +106,8 @@ soup_request_data_send (SoupRequest *request, if (*start) { int decoded_length = 0; - guchar *buf = (guchar *) uri_decoded_copy (start, strlen (start), &decoded_length); + guchar *buf = (guchar *) soup_uri_decoded_copy (start, strlen (start), + &decoded_length); if (base64) buf = g_base64_decode_inplace ((gchar*) buf, &data->priv->content_length); |