qcacmn: Add qdf_str_dup() API
Add a QDF abstraction for strdup(). Change-Id: I141e625a91e3433c2a66bc75b4e860ed6ef266ac CRs-Fixed: 2194537
This commit is contained in:
@@ -40,6 +40,17 @@ static inline bool qdf_is_space(char c)
|
||||
return __qdf_is_space(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* qdf_str_dup() - duplicate null-terminated string @src
|
||||
* @dest: double pointer to be populated
|
||||
* @src: the null-terminated string to be duplicated
|
||||
*
|
||||
* @dest must be freed using qdf_mem_free() to avoid memory leaks.
|
||||
*
|
||||
* Return: QDF_STATUS; @dest set to NULL on failure, a valid address on success
|
||||
*/
|
||||
QDF_STATUS qdf_str_dup(char **dest, const char *src);
|
||||
|
||||
/**
|
||||
* qdf_str_left_trim() - Trim any leading whitespace from @str
|
||||
* @str: the string to trim
|
||||
|
Reference in New Issue
Block a user