mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
Introduce tr_str_is_empty to relay intent better
This commit is contained in:
@@ -202,6 +202,11 @@ char* tr_strdup(void const* in);
|
||||
*/
|
||||
int tr_strcmp0(char const* str1, char const* str2);
|
||||
|
||||
static inline bool tr_str_is_empty(char const* value)
|
||||
{
|
||||
return value == NULL || *value == '\0';
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief like memcmp() but gracefully handles NULL pointers
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user