Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cookies.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ new_cookies() {
COOKIES this;
char name[] = "cookies.txt";

this = calloc(sizeof(struct COOKIES_T), 1);
this = calloc(1, sizeof(struct COOKIES_T));
this->size = 0;
char *p = getenv("HOME");
len = p ? strlen(p) : 60;
Expand Down
2 changes: 1 addition & 1 deletion src/creds.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ new_creds(SCHEME scheme, char *str)
{
CREDS this;

this = calloc(sizeof(struct CREDS_T), 1);
this = calloc(1, sizeof(struct CREDS_T));
this->scheme = scheme;
this->username = NULL;
this->password = NULL;
Expand Down
4 changes: 2 additions & 2 deletions src/crew.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ new_crew(int size, int maxsize, BOOLEAN block)
int c;
CREW this;

if ((this = calloc(sizeof(*this),1)) == NULL)
if ((this = calloc(1,sizeof(*this))) == NULL)
return NULL;

if ((this->threads = (pthread_t *)malloc(sizeof(pthread_t)*size)) == NULL)
Expand Down Expand Up @@ -147,7 +147,7 @@ private void
}

BOOLEAN
crew_add(CREW crew, void (*routine)(), void *arg)
crew_add(CREW crew, void (*routine)(void *), void *arg)
{
int c;
WORK *workptr;
Expand Down
4 changes: 2 additions & 2 deletions src/crew.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@

typedef struct work
{
void (*routine)();
void (*routine)(void *);
void *arg;
struct work *next;
} WORK;

typedef struct CREW_T *CREW;

CREW new_crew(int size, int maxsize, BOOLEAN block);
BOOLEAN crew_add(CREW this, void (*routine)(), void *arg);
BOOLEAN crew_add(CREW this, void (*routine)(void *), void *arg);
BOOLEAN crew_cancel(CREW this);
BOOLEAN crew_join(CREW this, BOOLEAN finish, void **payload);
void crew_destroy(CREW this);
Expand Down
2 changes: 1 addition & 1 deletion src/data.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ new_data()
{
DATA this;

this = calloc(sizeof(*this),1);
this = calloc(1,sizeof(*this));
this->total = 0.0;
this->available = 0.0;
this->count = 0.0;
Expand Down
2 changes: 1 addition & 1 deletion src/date.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ DATE
new_date(char *date)
{
time_t now;
DATE this = calloc(DATESIZE, 1);
DATE this = calloc(1, DATESIZE);
this->tm = NULL;
this->etag = NULL;
this->date = xmalloc(MAX_DATE_LEN);
Expand Down
2 changes: 1 addition & 1 deletion src/date.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ extern size_t DATESIZE;
* because then we have one destroyer
* that we can pass to the HASH
*/
DATE new_date();
DATE new_date(char *);
DATE new_etag(char *etag);

DATE date_destroy(DATE this);
Expand Down
2 changes: 1 addition & 1 deletion src/handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <signal.h>
#include <crew.h>

void spin_doctor();
void spin_doctor(CREW crew);
void sig_handler(CREW crew);

#endif/*HANDLER_H*/
2 changes: 1 addition & 1 deletion src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ show_config(int EXIT)
printf("URLs file: %s\n", strlen(my.file) > 1 ? my.file : URL_FILE);
printf("thread limit: %d\n", (my.limit < 1) ? 255 : my.limit);
printf("logging: %s\n", my.logging ? "true" : "false");
printf("log file: %s\n", (my.logfile == NULL) ? LOG_FILE : my.logfile);
printf("log file: %s\n", (*my.logfile) ? my.logfile : LOG_FILE);
printf("resource file: %s\n", my.rc);
printf("timestamped output: %s\n", my.timestamp?"true":"false");
printf("comma separated output: %s\n", my.csv?"true":"false");
Expand Down
2 changes: 1 addition & 1 deletion src/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
typedef struct PAGE_T *PAGE;

PAGE new_page();
PAGE new_page(char *);
PAGE page_destroy(PAGE this);
void page_concat(PAGE this, const char *str, const int len);
void page_clear(PAGE this);
Expand Down
8 changes: 4 additions & 4 deletions src/setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,16 @@ char *strchr (), *strrchr ();


#ifndef HAVE_STRCASECMP
int strcasecmp();
int strcasecmp(const char *, const char *);
#endif
#ifndef HAVE_STRNCASECMP
int strncasecmp();
int strncasecmp(const char *, const char *, size_t);
#endif
#ifndef HAVE_STRNCMP
int strncmp();
int strncmp(const char *, const char *, size_t);
#endif
#ifndef HAVE_STRLEN
int strlen();
int strlen(const char *);
#endif

#include <url.h>
Expand Down