mirror of
https://github.com/curl/curl.git
synced 2026-08-25 20:03:36 +03:00
bufref: rename *memdup() to *memdup0()
To make it clearer to readers of the code that the resulting dup also has a null terminator. Something a "normal" memdup() does not provide. Closes #19833
This commit is contained in:
parent
fe7703a0b3
commit
1def380032
9 changed files with 20 additions and 19 deletions
|
|
@ -87,9 +87,9 @@ static CURLcode test_unit1661(const char *arg)
|
|||
fail_unless(Curl_bufref_len(&bufref) == 13, "Wrong data size returned");
|
||||
|
||||
/**
|
||||
* testing Curl_bufref_memdup
|
||||
* testing Curl_bufref_memdup0
|
||||
*/
|
||||
res = Curl_bufref_memdup(&bufref, "1661", 3);
|
||||
res = Curl_bufref_memdup0(&bufref, "1661", 3);
|
||||
abort_unless(res == CURLE_OK, curl_easy_strerror(res));
|
||||
fail_unless(freecount == 1, "Destructor not called");
|
||||
fail_unless((const char *)bufref.ptr != buffer, "Returned pointer not set");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue