mirror of
https://github.com/curl/curl.git
synced 2026-08-25 00:13:34 +03:00
checksrc: move open braces to comply with function declaration style
This commit is contained in:
parent
80e7cfeb87
commit
6832c1d4b2
13 changed files with 78 additions and 65 deletions
|
|
@ -50,7 +50,8 @@ static const char *RTP_DATA = "$_1234\n\0asdf";
|
|||
|
||||
static int rtp_packet_count = 0;
|
||||
|
||||
static size_t rtp_write(void *ptr, size_t size, size_t nmemb, void *stream) {
|
||||
static size_t rtp_write(void *ptr, size_t size, size_t nmemb, void *stream)
|
||||
{
|
||||
char *data = (char *)ptr;
|
||||
int channel = RTP_PKT_CHANNEL(data);
|
||||
int message_size;
|
||||
|
|
|
|||
|
|
@ -69,12 +69,12 @@ struct timetest {
|
|||
};
|
||||
|
||||
UNITTEST_START
|
||||
{
|
||||
struct timeval now;
|
||||
long timeout;
|
||||
unsigned int i;
|
||||
|
||||
struct timeval now;
|
||||
long timeout;
|
||||
unsigned int i;
|
||||
|
||||
const struct timetest run[] = {
|
||||
const struct timetest run[] = {
|
||||
/* both timeouts set, not connecting */
|
||||
{BASE + 4, 0, 10000, 8000, FALSE, 6000, "6 seconds should be left"},
|
||||
{BASE + 4, 990000, 10000, 8000, FALSE, 5010, "5010 ms should be left"},
|
||||
|
|
@ -126,21 +126,20 @@ const struct timetest run[] = {
|
|||
/* both timeouts set, connecting, connect timeout the longer one */
|
||||
{BASE + 4, 0, 10000, 12000, TRUE, 6000, "6 seconds should be left"},
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
/* this is the pretended start time of the transfer */
|
||||
data->progress.t_startsingle.tv_sec = BASE;
|
||||
data->progress.t_startsingle.tv_usec = 0;
|
||||
data->progress.t_startop.tv_sec = BASE;
|
||||
data->progress.t_startop.tv_usec = 0;
|
||||
/* this is the pretended start time of the transfer */
|
||||
data->progress.t_startsingle.tv_sec = BASE;
|
||||
data->progress.t_startsingle.tv_usec = 0;
|
||||
data->progress.t_startop.tv_sec = BASE;
|
||||
data->progress.t_startop.tv_usec = 0;
|
||||
|
||||
for(i=0; i < sizeof(run)/sizeof(run[0]); i++) {
|
||||
NOW(run[i].now_s, run[i].now_us);
|
||||
TIMEOUTS(run[i].timeout_ms, run[i].connecttimeout_ms);
|
||||
timeout = Curl_timeleft(data, &now, run[i].connecting);
|
||||
if(timeout != run[i].result)
|
||||
fail(run[i].comment);
|
||||
for(i=0; i < sizeof(run)/sizeof(run[0]); i++) {
|
||||
NOW(run[i].now_s, run[i].now_us);
|
||||
TIMEOUTS(run[i].timeout_ms, run[i].connecttimeout_ms);
|
||||
timeout = Curl_timeleft(data, &now, run[i].connecting);
|
||||
if(timeout != run[i].result)
|
||||
fail(run[i].comment);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
UNITTEST_STOP
|
||||
|
|
|
|||
|
|
@ -42,7 +42,8 @@ static void unit_stop(void)
|
|||
|
||||
#if defined(MSDOS) || defined(WIN32)
|
||||
|
||||
static char *getflagstr(int flags) {
|
||||
static char *getflagstr(int flags)
|
||||
{
|
||||
char *buf = malloc(256);
|
||||
fail_unless(buf, "out of memory");
|
||||
snprintf(buf, 256, "%s,%s,%s,%s",
|
||||
|
|
@ -53,7 +54,8 @@ static char *getflagstr(int flags) {
|
|||
return buf;
|
||||
}
|
||||
|
||||
static char *getcurlcodestr(int cc) {
|
||||
static char *getcurlcodestr(int cc)
|
||||
{
|
||||
char *buf = malloc(256);
|
||||
fail_unless(buf, "out of memory");
|
||||
snprintf(buf, 256, "%s (%d)",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue