mirror of
https://github.com/curl/curl.git
synced 2026-05-30 06:47:28 +03:00
tidy-up: miscellaneous
- schannel: delete superfluous parenthesis. - tftp: delete stray space from log output. - ws: update guard comment. - docs/examples: constify variables. - runtests/servers: enclose unknown parameter between quotes. - scripts/perlcheck.sh: drop redundant grep `-E` option. - THANKS: move names from comments to THANKS. - sync `--depth` option style across scripts. - sync git repo URL ending between some scripts. - BINDINGS.md: drop protocol from archive.org URL path. - whitespace, indent, unfold lines. Closes #19565
This commit is contained in:
parent
a87383828e
commit
1b48c6148a
32 changed files with 62 additions and 71 deletions
|
|
@ -170,7 +170,7 @@ static size_t follow_links(CURLM *multi, struct memory *mem,
|
|||
return count;
|
||||
}
|
||||
|
||||
static int is_html(char *ctype)
|
||||
static int is_html(const char *ctype)
|
||||
{
|
||||
return ctype != NULL && strlen(ctype) > 10 && strstr(ctype, "text/html");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ struct WriteThis {
|
|||
static size_t read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
|
||||
{
|
||||
struct WriteThis *upload = (struct WriteThis *)userp;
|
||||
size_t max = size*nmemb;
|
||||
size_t max = size * nmemb;
|
||||
|
||||
if(max < 1)
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ static size_t getcontentlengthfunc(void *ptr, size_t size, size_t nmemb,
|
|||
|
||||
r = sscanf(ptr, "Content-Length: %ld\n", &len);
|
||||
if(r == 1)
|
||||
*((long *) stream) = len;
|
||||
*((long *)stream) = len;
|
||||
|
||||
return size * nmemb;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -430,9 +430,9 @@ int init_fifo(void)
|
|||
int main(void)
|
||||
{
|
||||
struct GlobalInfo *g = g_malloc0(sizeof(struct GlobalInfo));
|
||||
GMainLoop*gmain;
|
||||
GMainLoop *gmain;
|
||||
int fd;
|
||||
GIOChannel* ch;
|
||||
GIOChannel *ch;
|
||||
|
||||
CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
|
||||
if(res)
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ static size_t write_cb(char *data, size_t n, size_t l, void *userp)
|
|||
/* take care of the data here, ignored in this example */
|
||||
(void)data;
|
||||
(void)userp;
|
||||
return n*l;
|
||||
return n * l;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ struct input {
|
|||
int num;
|
||||
};
|
||||
|
||||
static void dump(const char *text, int num, unsigned char *ptr,
|
||||
static void dump(const char *text, int num, const unsigned char *ptr,
|
||||
size_t size, char nohex)
|
||||
{
|
||||
size_t i;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
#define TRUE 1
|
||||
|
||||
static void dump(const char *text, FILE *stream, unsigned char *ptr,
|
||||
static void dump(const char *text, FILE *stream, const unsigned char *ptr,
|
||||
size_t size, char nohex)
|
||||
{
|
||||
size_t i;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue