Commit 289d2117 authored by Daniel Salzman's avatar Daniel Salzman

Remove _t suffix from struct names

parent 7e1bf96b
......@@ -31,10 +31,10 @@
#include <stddef.h>
struct ref_t;
struct ref;
/*! \brief Prototype for object destructor callback. */
typedef void (*ref_destructor_t)(struct ref_t * p);
typedef void (*ref_destructor_t)(struct ref * p);
/*!
* \brief Structure for reference counting.
......@@ -51,7 +51,7 @@ typedef void (*ref_destructor_t)(struct ref_t * p);
* }
* \endcode
*/
typedef struct ref_t {
typedef struct ref {
size_t count; /*! \brief Reference counter. */
ref_destructor_t dtor; /*! \brief Object destructor function. */
} ref_t;
......
......@@ -65,7 +65,7 @@
* used in the configuration. Same interface could be used for
* listening and outgoing function.
*/
typedef struct conf_iface_t {
typedef struct conf_iface {
node_t n;
char *name; /*!< Internal name for the interface. */
knot_tsig_key_t *key; /*!< TSIG key (only applic for remotes). */
......@@ -79,7 +79,7 @@ typedef struct conf_iface_t {
*
* Used for zone ACL lists to prevent node duplication.
*/
typedef struct conf_remote_t {
typedef struct conf_remote {
node_t n; /*!< List node. */
conf_iface_t *remote; /*!< Pointer to interface descriptor. */
} conf_remote_t;
......@@ -89,7 +89,7 @@ typedef struct conf_remote_t {
*
* Holds the name of a remote in the list.
*/
typedef struct conf_group_remote_t {
typedef struct conf_group_remote {
node_t n;
char *name;
} conf_group_remote_t;
......@@ -97,7 +97,7 @@ typedef struct conf_group_remote_t {
/*!
* \brief Group of remotes.
*/
typedef struct conf_group_t {
typedef struct conf_group {
node_t n; /*!< List node. */
char *name; /*!< Unique name of the group. */
list_t remotes; /*!< List of remote names. */
......@@ -112,7 +112,7 @@ typedef struct conf_group_t {
* as a source for the zone transfer and multiple DNS servers to allow
* zone transfers. Same logic applies for the NOTIFY.
*/
typedef struct conf_zone_t {
typedef struct conf_zone {
char *name; /*!< Zone name. */
char *file; /*!< Path to a zone file. */
char *storage; /*!< Path to a storage dir. */
......@@ -162,7 +162,7 @@ typedef enum conf_section_t {
/*!
* \brief TSIG key list item.
*/
typedef struct conf_key_t {
typedef struct conf_key {
node_t n;
knot_tsig_key_t k;
} conf_key_t;
......@@ -170,7 +170,7 @@ typedef struct conf_key_t {
/*!
* \brief Remote control interface.
*/
typedef struct conf_control_t {
typedef struct conf_control {
conf_iface_t *iface; /*!< Remote control interface. */
list_t allow; /*!< List of allowed remotes. */
bool have; /*!< Set if configured. */
......@@ -181,7 +181,7 @@ typedef struct conf_control_t {
*
* Configuration structure.
*/
typedef struct conf_t {
typedef struct conf {
/*
* System
*/
......@@ -265,7 +265,7 @@ typedef struct conf_t {
/*!
* \brief Config hook prototype.
*/
typedef struct conf_hook_t {
typedef struct conf_hook {
node_t n;
int sections; /*!< Bitmask of watched sections. */
int (*update)(const conf_t*, void*); /*!< Function executed on config load. */
......
......@@ -44,7 +44,7 @@
#define KNOT_CTL_SOCKET_UMASK 0007
/*! \brief Remote command structure. */
typedef struct remote_cmdargs_t {
typedef struct remote_cmdargs {
const knot_rrset_t *arg;
unsigned argc;
knot_rcode_t rc;
......@@ -106,7 +106,7 @@ typedef int (*remote_cmdf_t)(server_t*, remote_cmdargs_t*);
typedef int (remote_zonef_t)(zone_t *);
/*! \brief Remote command table item. */
typedef struct remote_cmd_t {
typedef struct remote_cmd {
const char *name;
remote_cmdf_t f;
} remote_cmd_t;
......@@ -122,7 +122,7 @@ static int remote_c_flush(server_t *s, remote_cmdargs_t* a);
static int remote_c_signzone(server_t *s, remote_cmdargs_t* a);
/*! \brief Table of remote commands. */
struct remote_cmd_t remote_cmd_tbl[] = {
struct remote_cmd remote_cmd_tbl[] = {
{ "stop", &remote_c_stop },
{ "reload", &remote_c_reload },
{ "refresh", &remote_c_refresh },
......
......@@ -81,7 +81,7 @@ int query_plan_step(struct query_plan *plan, int stage, qmodule_process_t proces
return KNOT_EOK;
}
struct query_module *query_module_open(struct conf_t *config, const char *name,
struct query_module *query_module_open(struct conf *config, const char *name,
const char *param, mm_ctx_t *mm)
{
/* Locate compiled-in modules. */
......
......@@ -61,7 +61,7 @@ enum query_stage {
struct query_data;
struct query_module;
struct query_plan;
struct conf_t;
struct conf;
/* Module callback required API. */
typedef int (*qmodule_load_t)(struct query_plan *plan, struct query_module *self);
......@@ -78,7 +78,7 @@ struct query_module {
void *ctx;
char *param;
mm_ctx_t *mm;
struct conf_t *config;
struct conf *config;
qmodule_load_t load;
qmodule_unload_t unload;
};
......@@ -112,7 +112,7 @@ int query_plan_step(struct query_plan *plan, int stage, qmodule_process_t proces
* \brief Open query module identified by name.
* \note Module 'load' hook is NOT called and left upon a caller to decide.
*/
struct query_module *query_module_open(struct conf_t *config, const char *name,
struct query_module *query_module_open(struct conf *config, const char *name,
const char *param, mm_ctx_t *mm);
/*!
......
......@@ -41,8 +41,8 @@
#include <pthread.h>
/* Forward decls */
struct dthread_t;
struct dt_unit_t;
struct dthread;
struct dt_unit;
/*!
* \brief Thread state enumeration.
......@@ -69,21 +69,21 @@ typedef enum {
* Implement this by checking dt_is_cancelled() and return
* as soon as possible.
*/
typedef int (*runnable_t)(struct dthread_t *);
typedef int (*runnable_t)(struct dthread *);
/*!
* \brief Single thread descriptor public API.
*/
typedef struct dthread_t {
typedef struct dthread {
volatile unsigned state; /*!< Bitfield of dt_flag flags. */
runnable_t run; /*!< Runnable function or 0. */
runnable_t destruct; /*!< Destructor function or 0. */
void *data; /*!< Currently active data */
struct dt_unit_t *unit; /*!< Reference to assigned unit. */
void *_adata; /* Thread-specific data. */
pthread_t _thr; /* Thread */
pthread_attr_t _attr; /* Thread attributes */
pthread_mutex_t _mx; /* Thread state change lock. */
struct dt_unit *unit; /*!< Reference to assigned unit. */
void *_adata; /*!< Thread-specific data. */
pthread_t _thr; /*!< Thread */
pthread_attr_t _attr; /*!< Thread attributes */
pthread_mutex_t _mx; /*!< Thread state change lock. */
} dthread_t;
/*!
......@@ -93,14 +93,14 @@ typedef struct dthread_t {
* Unit is coherent if all threads execute
* the same runnable.
*/
typedef struct dt_unit_t {
typedef struct dt_unit {
int size; /*!< Unit width (number of threads) */
struct dthread_t **threads; /*!< Array of threads */
pthread_cond_t _notify; /* Notify thread */
pthread_mutex_t _notify_mx; /* Condition mutex */
pthread_cond_t _report; /* Report thread state */
pthread_mutex_t _report_mx; /* Condition mutex */
pthread_mutex_t _mx; /* Unit lock */
struct dthread **threads; /*!< Array of threads */
pthread_cond_t _notify; /*!< Notify thread */
pthread_mutex_t _notify_mx; /*!< Condition mutex */
pthread_cond_t _report; /*!< Report thread state */
pthread_mutex_t _report_mx; /*!< Condition mutex */
pthread_mutex_t _mx; /*!< Unit lock */
} dt_unit_t;
/*!
......
......@@ -63,7 +63,7 @@ typedef enum journal_flag_t {
* Each node represents journal entry and points
* to position of the data in the permanent storage.
*/
typedef struct journal_node_t
typedef struct journal_node
{
uint64_t id; /*!< Node ID. */
uint16_t flags; /*!< Node flags. */
......@@ -81,7 +81,7 @@ typedef struct journal_node_t
* Each journal has a fixed number of nodes.
*
*/
typedef struct journal_t
typedef struct journal
{
int fd;
char *path; /*!< Path to journal file. */
......@@ -177,7 +177,7 @@ bool journal_exists(const char *path);
* \retval KNOT_ERANGE if given entry was not found.
* \return < KNOT_EOK on error.
*/
int journal_load_changesets(const struct zone_t *zone, list_t *dst,
int journal_load_changesets(const struct zone *zone, list_t *dst,
uint32_t from, uint32_t to);
/*!
......
......@@ -41,7 +41,7 @@ enum {
RRL_WILDCARD = 1 << 1 /*!< Query to wildcard name. */
};
struct zone_t;
struct zone;
/*!
* \brief RRL hash bucket.
......@@ -134,7 +134,7 @@ int rrl_setlocks(rrl_table_t *rrl, unsigned granularity);
* \return assigned bucket
*/
rrl_item_t* rrl_hash(rrl_table_t *t, const struct sockaddr_storage *a, rrl_req_t *p,
const struct zone_t *zone, uint32_t stamp, int* lock);
const struct zone *zone, uint32_t stamp, int* lock);
/*!
* \brief Query the RRL table for accept or deny, when the rate limit is reached.
......@@ -147,7 +147,7 @@ rrl_item_t* rrl_hash(rrl_table_t *t, const struct sockaddr_storage *a, rrl_req_t
* \retval KNOT_ELIMIT when the limit is reached.
*/
int rrl_query(rrl_table_t *rrl, const struct sockaddr_storage *a, rrl_req_t *req,
const struct zone_t *zone);
const struct zone *zone);
/*!
* \brief Roll a dice whether answer slips or not.
......
......@@ -154,7 +154,7 @@ static int server_init_iface(iface_t *new_if, conf_iface_t *cfg_if)
return KNOT_EOK;
}
static void remove_ifacelist(struct ref_t *p)
static void remove_ifacelist(struct ref *p)
{
ifacelist_t *ifaces = (ifacelist_t *)p;
......@@ -179,7 +179,7 @@ static void remove_ifacelist(struct ref_t *p)
* \param server Server instance.
* \return number of added sockets.
*/
static int reconfigure_sockets(const struct conf_t *conf, server_t *s)
static int reconfigure_sockets(const struct conf *conf, server_t *s)
{
/* Prepare helper lists. */
char addr_str[SOCKADDR_STRLEN] = {0};
......@@ -475,7 +475,7 @@ void server_stop(server_t *server)
}
/*! \brief Reconfigure UDP and TCP query processing threads. */
static int reconfigure_threads(const struct conf_t *conf, server_t *server)
static int reconfigure_threads(const struct conf *conf, server_t *server)
{
/* Estimate number of threads/manager. */
int ret = KNOT_EOK;
......@@ -519,7 +519,7 @@ static int reconfigure_threads(const struct conf_t *conf, server_t *server)
return ret;
}
static int reconfigure_rate_limits(const struct conf_t *conf, server_t *server)
static int reconfigure_rate_limits(const struct conf *conf, server_t *server)
{
/* Rate limiting. */
if (!server->rrl && conf->rrl > 0) {
......@@ -548,7 +548,7 @@ static int reconfigure_rate_limits(const struct conf_t *conf, server_t *server)
return KNOT_EOK;
}
int server_reconfigure(const struct conf_t *conf, void *data)
int server_reconfigure(const struct conf *conf, void *data)
{
server_t *server = (server_t *)data;
dbg_server("%s(%p, %p)\n", __func__, conf, server);
......
......@@ -40,15 +40,15 @@
#include "knot/zone/zonedb.h"
/* Forwad declarations. */
struct iface_t;
struct server_t;
struct conf_t;
struct iface;
struct server;
struct conf;
/*! \brief I/O handler structure.
*/
typedef struct iohandler {
struct node n;
struct server_t *server; /*!< Reference to server */
struct server *server; /*!< Reference to server */
dt_unit_t *unit; /*!< Threading unit */
unsigned *thread_state; /*!< Thread state */
unsigned *thread_id; /*!< Thread identifier. */
......@@ -65,7 +65,7 @@ typedef enum {
/*!
* \brief Server interface structure.
*/
typedef struct iface_t {
typedef struct iface {
struct node n;
int fd[2];
struct sockaddr_storage addr;
......@@ -89,7 +89,7 @@ typedef struct ifacelist {
*
* Keeps references to all important structures needed for operation.
*/
typedef struct server_t {
typedef struct server {
/*! \brief Server state tracking. */
volatile unsigned state;
......@@ -178,7 +178,7 @@ void server_stop(server_t *server);
* \retval KNOT_EINVAL on invalid parameters.
* \retval KNOT_ERROR unspecified error.
*/
int server_reconfigure(const struct conf_t *conf, void *data);
int server_reconfigure(const struct conf *conf, void *data);
/*!
* \brief Reconfigure zone database.
......@@ -187,7 +187,7 @@ int server_reconfigure(const struct conf_t *conf, void *data);
*
* \return KNOT_EOK on success or KNOT_ error
*/
int server_update_zones(const struct conf_t *conf, void *data);
int server_update_zones(const struct conf *conf, void *data);
/*!
* \brief Update fdsets from current interfaces list.
......
......@@ -83,7 +83,7 @@ static uint32_t acl_fill_mask32(short nbits)
return htonl(r);
}
int netblock_match(struct conf_iface_t *a1, const struct sockaddr_storage *a2)
int netblock_match(struct conf_iface *a1, const struct sockaddr_storage *a2)
{
int ret = 0;
uint32_t mask = 0xffffffff;
......@@ -120,7 +120,7 @@ int netblock_match(struct conf_iface_t *a1, const struct sockaddr_storage *a2)
return ret;
}
struct conf_iface_t* acl_find(list_t *acl, const struct sockaddr_storage *addr,
struct conf_iface* acl_find(list_t *acl, const struct sockaddr_storage *addr,
const knot_dname_t *key_name)
{
if (acl == NULL || addr == NULL) {
......
......@@ -34,10 +34,10 @@
#include "libknot/internal/mempattern.h"
#include "libknot/rrtype/tsig.h"
struct conf_iface_t;
struct conf_iface;
/*! \brief Match address against netblock. */
int netblock_match(struct conf_iface_t *a1, const struct sockaddr_storage *a2);
int netblock_match(struct conf_iface *a1, const struct sockaddr_storage *a2);
/*!
* \brief Match address against ACL.
......@@ -49,7 +49,7 @@ int netblock_match(struct conf_iface_t *a1, const struct sockaddr_storage *a2);
* \retval Matching rule instance if found.
* \retval NULL if it didn't find a match.
*/
struct conf_iface_t* acl_find(list_t *acl, const struct sockaddr_storage *addr,
struct conf_iface* acl_find(list_t *acl, const struct sockaddr_storage *addr,
const knot_dname_t *key_name);
/*! @} */
......@@ -31,7 +31,7 @@
#include "knot/zone/node.h"
#include "knot/zone/zone-tree.h"
struct zone_t;
struct zone;
enum zone_contents_find_dname_result {
ZONE_NAME_FOUND = 1,
......@@ -40,7 +40,7 @@ enum zone_contents_find_dname_result {
/*----------------------------------------------------------------------------*/
typedef struct zone_contents_t {
typedef struct zone_contents {
zone_node_t *apex; /*!< Apex node of the zone (holding SOA) */
zone_tree_t *nodes;
......
......@@ -35,7 +35,7 @@
typedef int (*zone_event_cb)(zone_t *zone);
typedef struct event_info_t {
typedef struct event_info {
zone_event_type_t type;
const zone_event_cb callback;
const char *name;
......@@ -234,7 +234,7 @@ int zone_events_init(zone_t *zone)
return KNOT_EOK;
}
int zone_events_setup(struct zone_t *zone, worker_pool_t *workers,
int zone_events_setup(struct zone *zone, worker_pool_t *workers,
evsched_t *scheduler, namedb_t *timers_db)
{
if (!zone || !workers || !scheduler) {
......@@ -351,7 +351,7 @@ void zone_events_start(zone_t *zone)
pthread_mutex_unlock(&zone->events.mx);
}
time_t zone_events_get_time(const struct zone_t *zone, zone_event_type_t type)
time_t zone_events_get_time(const struct zone *zone, zone_event_type_t type)
{
if (zone == NULL) {
return KNOT_EINVAL;
......@@ -383,7 +383,7 @@ const char *zone_events_get_name(zone_event_type_t type)
return info->name;
}
time_t zone_events_get_next(const struct zone_t *zone, zone_event_type_t *type)
time_t zone_events_get_next(const struct zone *zone, zone_event_type_t *type)
{
if (zone == NULL || type == NULL) {
return KNOT_EINVAL;
......@@ -412,7 +412,7 @@ void zone_events_update(zone_t *zone, zone_t *old_zone)
replan_events(zone, old_zone);
}
void zone_events_replan_ddns(struct zone_t *zone, const struct zone_t *old_zone)
void zone_events_replan_ddns(struct zone *zone, const struct zone *old_zone)
{
if (old_zone) {
replan_update(zone, (zone_t *)old_zone);
......
......@@ -26,9 +26,9 @@
/* Timer special values. */
#define ZONE_EVENT_NOW 0
struct zone_t;
struct zone;
struct server_t;
struct server;
typedef enum zone_event_type {
ZONE_EVENT_INVALID = -1,
......@@ -68,7 +68,7 @@ typedef struct zone_events {
*
* \return KNOT_E*
*/
int zone_events_init(struct zone_t *zone);
int zone_events_init(struct zone *zone);
/*!
* \brief Set up zone events execution.
......@@ -80,7 +80,7 @@ int zone_events_init(struct zone_t *zone);
*
* \return KNOT_E*
*/
int zone_events_setup(struct zone_t *zone, worker_pool_t *workers,
int zone_events_setup(struct zone *zone, worker_pool_t *workers,
evsched_t *scheduler, namedb_t *timers_db);
/*!
......@@ -88,7 +88,7 @@ int zone_events_setup(struct zone_t *zone, worker_pool_t *workers,
*
* \param zone Zone whose events we want to deinitialize.
*/
void zone_events_deinit(struct zone_t *zone);
void zone_events_deinit(struct zone *zone);
/*!
* \brief Enqueue event type for asynchronous execution.
......@@ -99,7 +99,7 @@ void zone_events_deinit(struct zone_t *zone);
* \param zone Zone to schedule new event for.
* \param type Type of event.
*/
void zone_events_enqueue(struct zone_t *zone, zone_event_type_t type);
void zone_events_enqueue(struct zone *zone, zone_event_type_t type);
/*!
* \brief Schedule new zone event to absolute time.
......@@ -108,7 +108,7 @@ void zone_events_enqueue(struct zone_t *zone, zone_event_type_t type);
* \param type Type of event.
* \param time Absolute time.
*/
void zone_events_schedule_at(struct zone_t *zone, zone_event_type_t type, time_t time);
void zone_events_schedule_at(struct zone *zone, zone_event_type_t type, time_t time);
/*!
* \brief Schedule new zone event using relative time to current time.
......@@ -117,7 +117,7 @@ void zone_events_schedule_at(struct zone_t *zone, zone_event_type_t type, time_t
* \param type Type of event.
* \param dt Relative time.
*/
void zone_events_schedule(struct zone_t *zone, zone_event_type_t type, unsigned dt);
void zone_events_schedule(struct zone *zone, zone_event_type_t type, unsigned dt);
/*!
* \brief Check if zone event is scheduled.
......@@ -125,7 +125,7 @@ void zone_events_schedule(struct zone_t *zone, zone_event_type_t type, unsigned
* \param zone Zone to check event of.
* \param type Type of event.
*/
bool zone_events_is_scheduled(struct zone_t *zone, zone_event_type_t type);
bool zone_events_is_scheduled(struct zone *zone, zone_event_type_t type);
/*!
* \brief Cancel one zone event.
......@@ -133,21 +133,21 @@ bool zone_events_is_scheduled(struct zone_t *zone, zone_event_type_t type);
* \param zone Zone to cancel event in.
* \param type Type of event to cancel.
*/
void zone_events_cancel(struct zone_t *zone, zone_event_type_t type);
void zone_events_cancel(struct zone *zone, zone_event_type_t type);
/*!
* \brief Freeze all zone events and prevent new events from running.
*
* \param zone Zone to freeze events for.
*/
void zone_events_freeze(struct zone_t *zone);
void zone_events_freeze(struct zone *zone);
/*!
* \brief Start the events processing.
*
* \param zone Zone to start processing for.
*/
void zone_events_start(struct zone_t *zone);
void zone_events_start(struct zone *zone);
/*!
* \brief Return time of the occurence of the given event.
......@@ -159,7 +159,7 @@ void zone_events_start(struct zone_t *zone);
* \retval 0 when the event is not planned
* \retval negative value if event is invalid
*/
time_t zone_events_get_time(const struct zone_t *zone, zone_event_type_t type);
time_t zone_events_get_time(const struct zone *zone, zone_event_type_t type);
/*!
* \brief Return text name of the event.
......@@ -179,7 +179,7 @@ const char *zone_events_get_name(zone_event_type_t type);
*
* \return time of the next event or an error (negative number)
*/
time_t zone_events_get_next(const struct zone_t *zone, zone_event_type_t *type);
time_t zone_events_get_next(const struct zone *zone, zone_event_type_t *type);
/*!
* \brief Replans zone events after config change. Will reuse events where applicable.
......@@ -187,7 +187,7 @@ time_t zone_events_get_next(const struct zone_t *zone, zone_event_type_t *type);
* \param zone Zone with new config.
* \param old_zone Zone with old config.
*/
void zone_events_update(struct zone_t *zone, struct zone_t *old_zone);
void zone_events_update(struct zone *zone, struct zone *old_zone);
/*!
* \brief Replans DDNS processing event if DDNS queue is not empty.
......@@ -195,11 +195,11 @@ void zone_events_update(struct zone_t *zone, struct zone_t *old_zone);
* \param zone Zone with new config.
* \param old_zone Zone with old config.
*/
void zone_events_replan_ddns(struct zone_t *zone, const struct zone_t *old_zone);
void zone_events_replan_ddns(struct zone *zone, const struct zone *old_zone);
/*!
* \brief Write persistent timers to timers database.
*
* \return KNOT_E*
*/
int zone_events_write_persistent(struct zone_t *zone);
int zone_events_write_persistent(struct zone *zone);
......@@ -50,7 +50,7 @@ typedef enum zone_flag_t {
/*!
* \brief Structure for holding DNS zone.
*/
typedef struct zone_t
typedef struct zone
{
knot_dname_t *name;
zone_contents_t *contents;
......
......@@ -346,7 +346,7 @@ static int remove_old_zonedb(const knot_zonedb_t *db_new, knot_zonedb_t *db_old)
/*!
* \brief Update zone database according to configuration.
*/
int zonedb_reload(const conf_t *conf, struct server_t *server)
int zonedb_reload(const conf_t *conf, struct server *server)
{
/* Check parameters */
if (conf == NULL || server == NULL) {
......
......@@ -19,7 +19,7 @@
#include "knot/conf/conf.h"
#include "knot/zone/zonedb.h"
struct server_t;
struct server;
/*!
* \brief Update zone database according to configuration.
......@@ -31,4 +31,4 @@ struct server_t;
* \retval KNOT_EINVAL
* \retval KNOT_ERROR
*/
int zonedb_reload(const conf_t *conf, struct server_t *server);
int zonedb_reload(const conf_t *conf, struct server *server);
......@@ -45,7 +45,7 @@ typedef struct zcreator {
/*!
* \brief Zone loader structure.
*/
typedef struct zloader_t {
typedef struct zloader {
char *source; /*!< Zone source file. */
char *origin; /*!< Zone's origin string. */
bool semantic_checks; /*!< Do semantic checks. */
......
......@@ -19,7 +19,7 @@
/*!
* \brief Error-to-string mapping table.
*/
typedef struct error_table_t {
typedef struct error_table {
int id;
const char *name;
} error_table_t;
......
......@@ -43,7 +43,7 @@
#include "libknot/dname.h"
struct conf_t;
struct conf;
/*! \brief Log facility types. */
typedef enum {
......@@ -66,7 +66,7 @@ typedef enum {
/*!
* \brief Mapping of loglevels to message sources.
*/
typedef struct conf_log_map_t {
typedef struct conf_log_map {
node_t n;
int source; /*!< Log message source mask. */
int prios; /*!< Log priorities mask. */
......@@ -75,7 +75,7 @@ typedef struct conf_log_map_t {
/*!
* \brief Log facility descriptor.
*/
typedef struct conf_log_t {
typedef struct conf_log {
node_t n;
logtype_t type; /*!< Type of the log (SYSLOG/STDERR/FILE). */
char *file; /*!< Filename in case of LOG_FILE, else NULL. */
......
......@@ -32,8 +32,6 @@
/*!
* \brief A general purpose lookup table.
*
* \note Taken from NSD.
*/
struct lookup_table {
int id;
......
......@@ -29,7 +29,7 @@ static volatile int _runnable_i = 0;
static const int _runnable_cycles = 10000;
/*! \brief Unit runnable. */
int runnable(struct dthread_t *thread)
int runnable(struct dthread *thread)
{
for (int i = 0; i < _runnable_cycles; ++i) {
......@@ -55,7 +55,7 @@ static volatile int _destructor_data = 0;
static pthread_mutex_t _destructor_mx;
/*! \brief Thread destructor. */
int destruct(struct dthread_t *thread)
int destruct(struct dthread *thread)
{
pthread_mutex_lock(&_destructor_mx);
_destructor_data += 1;
......
......@@ -34,7 +34,7 @@
* Table may be consistent even if some collision occur (and they may occur).
*/
#ifdef ENABLE_TIMED_TESTS
struct bucketmap_t {
struct bucketmap {
unsigned i;
uint64_t x;
};
......@@ -55,7 +55,7 @@ static void* rrl_runnable(void *arg)
memcpy(&addr, d->addr, sizeof(sockaddr_t));
int lock = -1;
uint32_t now = time(NULL);
struct bucketmap_t *m = malloc(RRL_INSERTS * sizeof(struct bucketmap_t));
struct bucketmap *m = malloc(RRL_INSERTS * sizeof(struct bucketmap_t));
for (unsigned i = 0; i < RRL_INSERTS; ++i) {
m[i].i = knot_random_uint32_t(UINT32_MAX);
addr.addr4.sin_addr.s_addr = m[i].i;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment