Properly declare parameterless functions as such
Also use void in the definitions for consistency.
This commit is contained in:
parent
b82a8f4ec6
commit
b1db0ad1ee
@ -78,7 +78,7 @@ typedef struct cfuconf_stack_entry {
|
||||
} cfuconf_stack_entry_t;
|
||||
|
||||
static cfuconf_t *
|
||||
cfuconf_new() {
|
||||
cfuconf_new(void) {
|
||||
cfuconf_t *conf = calloc(1, sizeof(cfuconf_t));
|
||||
conf->type = libcfu_t_conf;
|
||||
conf->containers = cfuhash_new_with_flags(CFUHASH_IGNORE_CASE);
|
||||
|
@ -202,7 +202,7 @@ _cfuhash_new(size_t size, u_int32_t flags) {
|
||||
}
|
||||
|
||||
extern cfuhash_table_t *
|
||||
cfuhash_new() {
|
||||
cfuhash_new(void) {
|
||||
return _cfuhash_new(8, CFUHASH_FROZEN_UNTIL_GROWS);
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ typedef int (*cfuhash_foreach_fn_t)(void *key, size_t key_size, void *data, size
|
||||
void *arg);
|
||||
|
||||
/* Creates a new hash table. */
|
||||
extern cfuhash_table_t * cfuhash_new();
|
||||
extern cfuhash_table_t * cfuhash_new(void);
|
||||
|
||||
/* Creates a new hash table with the specified size (number of
|
||||
* buckets).
|
||||
|
@ -72,7 +72,7 @@ struct cfulist {
|
||||
};
|
||||
|
||||
extern cfulist_t *
|
||||
cfulist_new() {
|
||||
cfulist_new(void) {
|
||||
cfulist_t *list = calloc(1, sizeof(cfulist_t));
|
||||
#ifdef HAVE_PTHREAD_H
|
||||
pthread_mutex_init(&list->mutex, NULL);
|
||||
|
@ -63,7 +63,7 @@ typedef void * (*cfulist_map_fn_t)(void *data, size_t data_size, void *arg,
|
||||
typedef void (*cfulist_free_fn_t)(void *data);
|
||||
|
||||
/* Returns a new list. */
|
||||
extern cfulist_t * cfulist_new();
|
||||
extern cfulist_t * cfulist_new(void);
|
||||
|
||||
/* Same as cfulist_new(), but set a function to be called on each
|
||||
* element when the list is destroyed.
|
||||
|
@ -72,7 +72,7 @@ typedef struct cfuopt_list_entry {
|
||||
} cfuopt_list_entry_t;
|
||||
|
||||
extern cfuopt_t *
|
||||
cfuopt_new() {
|
||||
cfuopt_new(void) {
|
||||
cfuopt_t *context = calloc(1, sizeof(cfuopt_t));
|
||||
context->option_list = cfulist_new();
|
||||
context->option_map = cfuhash_new();
|
||||
|
@ -45,7 +45,7 @@ CFU_BEGIN_DECLS
|
||||
typedef struct cfuopt_struct cfuopt_t;
|
||||
|
||||
/* Returns a new options context */
|
||||
extern cfuopt_t *cfuopt_new();
|
||||
extern cfuopt_t *cfuopt_new(void);
|
||||
|
||||
/* Adds to the list of known options. */
|
||||
extern void cfuopt_add_entry(cfuopt_t *context, const char *opt_str, void *arg_data,
|
||||
|
@ -62,7 +62,7 @@ struct cfustring {
|
||||
};
|
||||
|
||||
extern cfustring_t *
|
||||
cfustring_new() {
|
||||
cfustring_new(void) {
|
||||
return cfustring_new_with_initial_size(0);
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ CFU_BEGIN_DECLS
|
||||
typedef struct cfustring cfustring_t;
|
||||
|
||||
/* Returns a new String. */
|
||||
extern cfustring_t * cfustring_new();
|
||||
extern cfustring_t * cfustring_new(void);
|
||||
|
||||
/* Returns a new String, but preallocates a buffer of the given size. */
|
||||
extern cfustring_t * cfustring_new_with_initial_size(size_t initial_size);
|
||||
|
@ -51,7 +51,7 @@ typedef struct cfutime {
|
||||
} cfutime;
|
||||
|
||||
extern cfutime_t *
|
||||
cfutime_new() {
|
||||
cfutime_new(void) {
|
||||
cfutime_t *time = calloc(1, sizeof(cfutime));
|
||||
time->type = libcfu_t_time;
|
||||
return time;
|
||||
|
@ -45,7 +45,7 @@ CFU_BEGIN_DECLS
|
||||
typedef struct cfutime cfutime_t;
|
||||
|
||||
/* Return a new cfutime structure. */
|
||||
extern cfutime_t *cfutime_new();
|
||||
extern cfutime_t *cfutime_new(void);
|
||||
|
||||
/* Start the timer. */
|
||||
extern void cfutime_begin(cfutime_t *time);
|
||||
|
Reference in New Issue
Block a user