mirror of
https://github.com/curl/curl.git
synced 2026-05-30 18:47:29 +03:00
examples: check more errors, fix cleanups, scope variables
Inspired by Joshua's report on examples. Closes #19055
This commit is contained in:
parent
61dcb56743
commit
64ed2ea196
42 changed files with 874 additions and 785 deletions
|
|
@ -32,10 +32,8 @@ struct data {
|
|||
char trace_ascii; /* 1 or 0 */
|
||||
};
|
||||
|
||||
static
|
||||
void dump(const char *text,
|
||||
FILE *stream, unsigned char *ptr, size_t size,
|
||||
char nohex)
|
||||
static void dump(const char *text, FILE *stream, unsigned char *ptr,
|
||||
size_t size, char nohex)
|
||||
{
|
||||
size_t i;
|
||||
size_t c;
|
||||
|
|
@ -83,10 +81,8 @@ void dump(const char *text,
|
|||
fflush(stream);
|
||||
}
|
||||
|
||||
static
|
||||
int my_trace(CURL *handle, curl_infotype type,
|
||||
char *data, size_t size,
|
||||
void *userp)
|
||||
static int my_trace(CURL *handle, curl_infotype type,
|
||||
char *data, size_t size, void *userp)
|
||||
{
|
||||
struct data *config = (struct data *)userp;
|
||||
const char *text;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue