diff options
author | Stefan Fritsch <sf@apache.org> | 2012-10-27 21:01:35 +0000 |
---|---|---|
committer | Stefan Fritsch <sf@apache.org> | 2012-10-27 21:01:35 +0000 |
commit | 4b9430801f1cefc08c0d252ea384509aec877a50 (patch) | |
tree | ddca53ea5d59095ec8a996c45a2484627afb139b /include/apr_strings.h | |
parent | ed1efc0aa392177af065f1624d3f739639324280 (diff) | |
download | apr-4b9430801f1cefc08c0d252ea384509aec877a50.tar.gz |
Document that some string functions check that the input string is not NULL
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1402868 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/apr_strings.h')
-rw-r--r-- | include/apr_strings.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/apr_strings.h b/include/apr_strings.h index 457217358..ed41931fb 100644 --- a/include/apr_strings.h +++ b/include/apr_strings.h @@ -90,7 +90,7 @@ APR_DECLARE(int) apr_strnatcasecmp(char const *a, char const *b); * duplicate a string into memory allocated out of a pool * @param p The pool to allocate out of * @param s The string to duplicate - * @return The new string + * @return The new string or NULL if s == NULL */ APR_DECLARE(char *) apr_pstrdup(apr_pool_t *p, const char *s); @@ -100,7 +100,7 @@ APR_DECLARE(char *) apr_pstrdup(apr_pool_t *p, const char *s); * @param p The pool to allocate out of * @param s The block of characters to duplicate * @param n The number of characters to duplicate - * @return The new string + * @return The new string or NULL if s == NULL * @remark This is a faster alternative to apr_pstrndup, for use * when you know that the string being duplicated really * has 'n' or more characters. If the string might contain @@ -118,7 +118,7 @@ APR_DECLARE(char *) apr_pstrmemdup(apr_pool_t *p, const char *s, apr_size_t n) * @param p The pool to allocate out of * @param s The string to duplicate * @param n The maximum number of characters to duplicate - * @return The new string + * @return The new string or NULL if s == NULL * @remark The amount of memory allocated from the pool is the length * of the returned string including the NUL terminator */ @@ -130,7 +130,7 @@ APR_DECLARE(char *) apr_pstrndup(apr_pool_t *p, const char *s, apr_size_t n); * @param p The pool to allocate from * @param m The memory to duplicate * @param n The number of bytes to duplicate - * @return The new block of memory + * @return The new block of memory or NULL if m == NULL */ APR_DECLARE(void *) apr_pmemdup(apr_pool_t *p, const void *m, apr_size_t n) #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) |