Improve comments.

This commit is contained in:
Michael Drake 2016-07-24 19:47:29 +01:00
parent e88d82f87f
commit 7417a21bb1
2 changed files with 3 additions and 2 deletions

View File

@ -97,7 +97,7 @@ nserror url_unescape(const char *str, size_t length,
new_len = res_pos - result;
if (new_len != length) {
/* Shrink wrap the allocaiton around the string */
/* Shrink wrap the allocation around the string */
char *tmp = realloc(result, new_len + 1);
if (tmp != NULL) {
result = tmp;

View File

@ -48,9 +48,10 @@ nserror url_escape(const char *unescaped, size_t toskip, bool sptoplus,
* \param[in] str String to unescape.
* \param[in] length Length of string or 0 to use strlen.
* \param[out] length_out Iff non-NULL, value updated to length of returned
* result_out string.
* result_out string (excluding trailing '\0'`).
* \param[out] result_out Returns unescaped string, owned by caller.
* Must be freed with free().
* Returned string has trailing '\0'.
* \return NSERROR_OK on success
*/
nserror url_unescape(const char *str, size_t length,