mirror of
https://github.com/curl/curl.git
synced 2026-07-26 21:17:16 +03:00
checksrc: code style: use 'char *name' style
This commit is contained in:
parent
bc7e08471c
commit
dbadaebfc4
68 changed files with 330 additions and 329 deletions
|
|
@ -29,8 +29,8 @@
|
|||
|
||||
int test(char *URL)
|
||||
{
|
||||
CURL* curls = NULL;
|
||||
CURLM* multi = NULL;
|
||||
CURL *curls = NULL;
|
||||
CURLM *multi = NULL;
|
||||
int still_running;
|
||||
int i = TEST_ERR_FAILURE;
|
||||
int res = 0;
|
||||
|
|
|
|||
|
|
@ -41,8 +41,8 @@
|
|||
|
||||
int test(char *URL)
|
||||
{
|
||||
CURL* easy = NULL;
|
||||
CURLM* multi = NULL;
|
||||
CURL *easy = NULL;
|
||||
CURLM *multi = NULL;
|
||||
int still_running;
|
||||
int res = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ int test(char *URL)
|
|||
CURLM *mcurl = NULL;
|
||||
int still_running = 1;
|
||||
struct timeval mp_start;
|
||||
struct curl_slist* rcpt_list = NULL;
|
||||
struct curl_slist *rcpt_list = NULL;
|
||||
|
||||
curl_global_init(CURL_GLOBAL_DEFAULT);
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
int test(char *URL)
|
||||
{
|
||||
long unmet;
|
||||
CURL* curl = NULL;
|
||||
CURL *curl = NULL;
|
||||
int res = 0;
|
||||
|
||||
global_init(CURL_GLOBAL_ALL);
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ test_cleanup:
|
|||
|
||||
int test(char *URL)
|
||||
{
|
||||
CURLM* multi = NULL;
|
||||
CURLM *multi = NULL;
|
||||
int res = 0;
|
||||
char *address = libtest_arg2;
|
||||
char *port = libtest_arg3;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
|
|
@ -29,8 +29,8 @@
|
|||
|
||||
int test(char *URL)
|
||||
{
|
||||
CURL* curls = NULL;
|
||||
CURLM* multi = NULL;
|
||||
CURL *curls = NULL;
|
||||
CURLM *multi = NULL;
|
||||
int still_running;
|
||||
int i = -1;
|
||||
int res = 0;
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
CURL *eh[NUM_HANDLES];
|
||||
|
||||
static int init(int num, CURLM *cm, const char* url, const char* userpwd,
|
||||
static int init(int num, CURLM *cm, const char *url, const char *userpwd,
|
||||
struct curl_slist *headers)
|
||||
{
|
||||
int res = 0;
|
||||
|
|
@ -99,7 +99,7 @@ init_failed:
|
|||
return res; /* failure */
|
||||
}
|
||||
|
||||
static int loop(int num, CURLM *cm, const char* url, const char* userpwd,
|
||||
static int loop(int num, CURLM *cm, const char *url, const char *userpwd,
|
||||
struct curl_slist *headers)
|
||||
{
|
||||
CURLMsg *msg;
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ static size_t write_callback(void *ptr, size_t size, size_t nmemb,
|
|||
}
|
||||
|
||||
|
||||
static curlioerr ioctl_callback(CURL * handle, int cmd, void *clientp)
|
||||
static curlioerr ioctl_callback(CURL *handle, int cmd, void *clientp)
|
||||
{
|
||||
(void)clientp;
|
||||
if(cmd == CURLIOCMD_RESTARTREAD) {
|
||||
|
|
|
|||
|
|
@ -145,10 +145,10 @@ static int curlTimerCallback(CURLM *multi, long timeout_ms, void *userp)
|
|||
/**
|
||||
* Check for curl completion.
|
||||
*/
|
||||
static int checkForCompletion(CURLM* curl, int* success)
|
||||
static int checkForCompletion(CURLM *curl, int *success)
|
||||
{
|
||||
int numMessages;
|
||||
CURLMsg* message;
|
||||
CURLMsg *message;
|
||||
int result = 0;
|
||||
*success = 0;
|
||||
while((message = curl_multi_info_read(curl, &numMessages)) != NULL) {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2011, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
|
|
@ -33,8 +33,8 @@
|
|||
int test(char *URL)
|
||||
{
|
||||
int stillRunning;
|
||||
CURLM* multiHandle = NULL;
|
||||
CURL* curl = NULL;
|
||||
CURLM *multiHandle = NULL;
|
||||
CURL *curl = NULL;
|
||||
int res = 0;
|
||||
|
||||
global_init(CURL_GLOBAL_ALL);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ static CURLcode send_request(CURL *curl, const char *url, int seq,
|
|||
{
|
||||
CURLcode res;
|
||||
size_t len = strlen(url) + 4 + 1;
|
||||
char* full_url = malloc(len);
|
||||
char *full_url = malloc(len);
|
||||
if(!full_url) {
|
||||
fprintf(stderr, "Not enough memory for full url\n");
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ static CURL *easy[MAX_EASY_HANDLES];
|
|||
static curl_socket_t sockets[MAX_EASY_HANDLES];
|
||||
static int res = 0;
|
||||
|
||||
static size_t callback(char* ptr, size_t size, size_t nmemb, void* data)
|
||||
static size_t callback(char *ptr, size_t size, size_t nmemb, void *data)
|
||||
{
|
||||
ssize_t idx = ((CURL **) data) - easy;
|
||||
curl_socket_t sock;
|
||||
|
|
@ -104,7 +104,7 @@ int test(char *url)
|
|||
int num_handles = 0;
|
||||
enum HandleState state = ReadyForNewHandle;
|
||||
size_t urllen = strlen(url) + 4 + 1;
|
||||
char* full_url = malloc(urllen);
|
||||
char *full_url = malloc(urllen);
|
||||
|
||||
start_test_timing();
|
||||
|
||||
|
|
|
|||
|
|
@ -2231,9 +2231,9 @@ int main(int argc, char *argv[])
|
|||
/* Clear out closed sockets */
|
||||
for(socket_idx = num_sockets - 1; socket_idx >= 1; --socket_idx) {
|
||||
if(CURL_SOCKET_BAD == all_sockets[socket_idx]) {
|
||||
char* dst = (char *) (all_sockets + socket_idx);
|
||||
char* src = (char *) (all_sockets + socket_idx + 1);
|
||||
char* end = (char *) (all_sockets + num_sockets);
|
||||
char *dst = (char *) (all_sockets + socket_idx);
|
||||
char *src = (char *) (all_sockets + socket_idx + 1);
|
||||
char *end = (char *) (all_sockets + num_sockets);
|
||||
memmove(dst, src, end - src);
|
||||
num_sockets -= 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
|
|
@ -42,8 +42,8 @@ static size_t print_httppost_callback(void *arg, const char *buf, size_t len)
|
|||
|
||||
UNITTEST_START
|
||||
int rc;
|
||||
struct curl_httppost* post = NULL;
|
||||
struct curl_httppost* last = NULL;
|
||||
struct curl_httppost *post = NULL;
|
||||
struct curl_httppost *last = NULL;
|
||||
size_t total_size = 0;
|
||||
char buffer[] = "test buffer";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue