1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-30 01:55:30 +00:00

parse_header_param: better describe behaviour when @ret is NULL

This got lost during merging of Kalle Olavi Niemitalo's patches.
This commit is contained in:
Miciah Dashiel Butler Masters 2006-06-23 06:07:22 +00:00 committed by Miciah Dashiel Butler Masters
parent 29ffe71bc1
commit 888faebaea

View File

@ -197,11 +197,14 @@ parse_header(unsigned char *head, unsigned char *item, unsigned char **ptr)
* It supposes that separator is ';' and ignore first element in the
* list. (ie. '1' is ignored in "1; URL=xxx")
* The return value is one of:
*
* - HEADER_PARAM_FOUND: the parameter was found, copied, and stored in *@ret.
* - HEADER_PARAM_NOT_FOUND: the parameter is not there. *@ret is now NULL.
* - HEADER_PARAM_OUT_OF_MEMORY: error. *@ret is now NULL.
*
* If @ret is NULL, then this function doesn't actually access *@ret,
* and tries to avoid allocating memory as well. */
* and cannot fail with HEADER_PARAM_OUT_OF_MEMORY. Some callers may
* rely on this. */
enum parse_header_param
parse_header_param(unsigned char *str, unsigned char *name, unsigned char **ret)
{