mirror of
https://github.com/curl/curl.git
synced 2026-08-03 17:20:29 +03:00
tidy-up: miscellaneous
- examples: sync debug output printf masks. - INSTALL-CMAKE.md: tidy up section for some options. - curl_sha512_256: delete comment suggesting an optimization. - vtls/keylog: scope a variable. - vtls/openssl: make a source code URL a permalink. - vtls/schannel: drop redundant parentheses. - test1119.pl: robustify `$1` -> `$s`. - sync arg names in comments to match the code. - tidy up and minor fixes to comments. - fix formatting/indenting/comment/newline/include nits. - move `UNITTEST` protos next to definitions, sync their argument names. - make variables static. - add parentheses to Perl `open()` calls. - drop unnecessary double quotes in Perl. - clang-format. Closes #21000
This commit is contained in:
parent
3512b673dd
commit
e0dd6eb4a4
148 changed files with 612 additions and 684 deletions
|
|
@ -29,9 +29,6 @@
|
|||
#define CURL_UINT32_TBL_MAGIC 0x62757473
|
||||
#endif
|
||||
|
||||
/* Clear the table, making it empty. */
|
||||
UNITTEST void Curl_uint32_tbl_clear(struct uint32_tbl *tbl);
|
||||
|
||||
void Curl_uint32_tbl_init(struct uint32_tbl *tbl,
|
||||
Curl_uint32_tbl_entry_dtor *entry_dtor)
|
||||
{
|
||||
|
|
@ -82,14 +79,8 @@ CURLcode Curl_uint32_tbl_resize(struct uint32_tbl *tbl, uint32_t nrows)
|
|||
return CURLE_OK;
|
||||
}
|
||||
|
||||
void Curl_uint32_tbl_destroy(struct uint32_tbl *tbl)
|
||||
{
|
||||
DEBUGASSERT(tbl->init == CURL_UINT32_TBL_MAGIC);
|
||||
Curl_uint32_tbl_clear(tbl);
|
||||
curlx_free(tbl->rows);
|
||||
memset(tbl, 0, sizeof(*tbl));
|
||||
}
|
||||
|
||||
/* Clear the table, making it empty. */
|
||||
UNITTEST void Curl_uint32_tbl_clear(struct uint32_tbl *tbl);
|
||||
UNITTEST void Curl_uint32_tbl_clear(struct uint32_tbl *tbl)
|
||||
{
|
||||
DEBUGASSERT(tbl->init == CURL_UINT32_TBL_MAGIC);
|
||||
|
|
@ -98,6 +89,14 @@ UNITTEST void Curl_uint32_tbl_clear(struct uint32_tbl *tbl)
|
|||
tbl->last_key_added = UINT32_MAX;
|
||||
}
|
||||
|
||||
void Curl_uint32_tbl_destroy(struct uint32_tbl *tbl)
|
||||
{
|
||||
DEBUGASSERT(tbl->init == CURL_UINT32_TBL_MAGIC);
|
||||
Curl_uint32_tbl_clear(tbl);
|
||||
curlx_free(tbl->rows);
|
||||
memset(tbl, 0, sizeof(*tbl));
|
||||
}
|
||||
|
||||
uint32_t Curl_uint32_tbl_capacity(struct uint32_tbl *tbl)
|
||||
{
|
||||
return tbl->nrows;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue