diff options
author | robot-contrib <robot-contrib@yandex-team.ru> | 2022-04-28 16:36:59 +0300 |
---|---|---|
committer | robot-contrib <robot-contrib@yandex-team.ru> | 2022-04-28 16:36:59 +0300 |
commit | 1d80f65d6a77d0e4c1b3a18a6a970715934ecd75 (patch) | |
tree | e0363932ca34036e90ac4cd461092c763acb3a4d /contrib/libs/curl/lib/strcase.c | |
parent | 505c75794e448a38ffa0b066ccef3299aec10239 (diff) | |
download | ydb-1d80f65d6a77d0e4c1b3a18a6a970715934ecd75.tar.gz |
Update contrib/libs/curl to 7.83.0
ref:72dd794f7af62e3844c14f0a9bcee77e66f30a36
Diffstat (limited to 'contrib/libs/curl/lib/strcase.c')
-rw-r--r-- | contrib/libs/curl/lib/strcase.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/libs/curl/lib/strcase.c b/contrib/libs/curl/lib/strcase.c index dd46ca1ba0e..692a3f14aee 100644 --- a/contrib/libs/curl/lib/strcase.c +++ b/contrib/libs/curl/lib/strcase.c @@ -131,6 +131,16 @@ void Curl_strntolower(char *dest, const char *src, size_t n) } while(*src++ && --n); } +/* Compare case-sensitive NUL-terminated strings, taking care of possible + * null pointers. Return true if arguments match. + */ +bool Curl_safecmp(char *a, char *b) +{ + if(a && b) + return !strcmp(a, b); + return !a && !b; +} + /* --- public functions --- */ int curl_strequal(const char *first, const char *second) |