mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-23 07:31:31 +00:00
(S)LIST_HEAD_INITIALIZER takes a (S)LIST_HEAD as an argument.
Fix some wrong usages. Note: this does not affect generated binaries as this argument is not used. PR: 137213 Submitted by: Eygene Ryabinkin (initial version) MFC after: 1 month
This commit is contained in:
parent
9189129097
commit
13e403fdea
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=201145
@ -113,14 +113,14 @@ static int cflags = REG_EXTENDED;
|
||||
static kvm_t *kd;
|
||||
static pid_t mypid;
|
||||
|
||||
static struct listhead euidlist = SLIST_HEAD_INITIALIZER(list);
|
||||
static struct listhead ruidlist = SLIST_HEAD_INITIALIZER(list);
|
||||
static struct listhead rgidlist = SLIST_HEAD_INITIALIZER(list);
|
||||
static struct listhead pgrplist = SLIST_HEAD_INITIALIZER(list);
|
||||
static struct listhead ppidlist = SLIST_HEAD_INITIALIZER(list);
|
||||
static struct listhead tdevlist = SLIST_HEAD_INITIALIZER(list);
|
||||
static struct listhead sidlist = SLIST_HEAD_INITIALIZER(list);
|
||||
static struct listhead jidlist = SLIST_HEAD_INITIALIZER(list);
|
||||
static struct listhead euidlist = SLIST_HEAD_INITIALIZER(euidlist);
|
||||
static struct listhead ruidlist = SLIST_HEAD_INITIALIZER(ruidlist);
|
||||
static struct listhead rgidlist = SLIST_HEAD_INITIALIZER(rgidlist);
|
||||
static struct listhead pgrplist = SLIST_HEAD_INITIALIZER(pgrplist);
|
||||
static struct listhead ppidlist = SLIST_HEAD_INITIALIZER(ppidlist);
|
||||
static struct listhead tdevlist = SLIST_HEAD_INITIALIZER(tdevlist);
|
||||
static struct listhead sidlist = SLIST_HEAD_INITIALIZER(sidlist);
|
||||
static struct listhead jidlist = SLIST_HEAD_INITIALIZER(jidlist);
|
||||
|
||||
static void usage(void) __attribute__((__noreturn__));
|
||||
static int killact(const struct kinfo_proc *);
|
||||
|
@ -73,7 +73,7 @@
|
||||
static sem_t sem_alloc(unsigned int value, semid_t semid, int system_sem);
|
||||
static void sem_free(sem_t sem);
|
||||
|
||||
static LIST_HEAD(, sem) named_sems = LIST_HEAD_INITIALIZER(&named_sems);
|
||||
static LIST_HEAD(, sem) named_sems = LIST_HEAD_INITIALIZER(named_sems);
|
||||
static pthread_mutex_t named_sems_mtx = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
__weak_reference(__sem_init, sem_init);
|
||||
|
@ -42,7 +42,7 @@
|
||||
#endif
|
||||
|
||||
struct _gss_mech_switch_list _gss_mechs =
|
||||
SLIST_HEAD_INITIALIZER(&_gss_mechs);
|
||||
SLIST_HEAD_INITIALIZER(_gss_mechs);
|
||||
gss_OID_set _gss_mech_oids;
|
||||
|
||||
/*
|
||||
|
@ -55,7 +55,7 @@ struct mech_info {
|
||||
};
|
||||
SLIST_HEAD(mech_info_list, mech_info);
|
||||
|
||||
static struct mech_info_list mechs = SLIST_HEAD_INITIALIZER(&mechs);
|
||||
static struct mech_info_list mechs = SLIST_HEAD_INITIALIZER(mechs);
|
||||
static const char **mech_names;
|
||||
|
||||
struct qop_info {
|
||||
@ -66,7 +66,7 @@ struct qop_info {
|
||||
};
|
||||
SLIST_HEAD(qop_info_list, qop_info);
|
||||
|
||||
static struct qop_info_list qops = SLIST_HEAD_INITIALIZER(&qops);
|
||||
static struct qop_info_list qops = SLIST_HEAD_INITIALIZER(qops);
|
||||
|
||||
static int
|
||||
_rpc_gss_string_to_oid(const char* s, gss_OID oid)
|
||||
|
@ -90,7 +90,7 @@ struct svc_rpc_gss_callback {
|
||||
rpc_gss_callback_t cb_callback;
|
||||
};
|
||||
static SLIST_HEAD(svc_rpc_gss_callback_list, svc_rpc_gss_callback)
|
||||
svc_rpc_gss_callbacks = SLIST_HEAD_INITIALIZER(&svc_rpc_gss_callbacks);
|
||||
svc_rpc_gss_callbacks = SLIST_HEAD_INITIALIZER(svc_rpc_gss_callbacks);
|
||||
|
||||
struct svc_rpc_gss_svc_name {
|
||||
SLIST_ENTRY(svc_rpc_gss_svc_name) sn_link;
|
||||
@ -102,7 +102,7 @@ struct svc_rpc_gss_svc_name {
|
||||
u_int sn_version;
|
||||
};
|
||||
static SLIST_HEAD(svc_rpc_gss_svc_name_list, svc_rpc_gss_svc_name)
|
||||
svc_rpc_gss_svc_names = SLIST_HEAD_INITIALIZER(&svc_rpc_gss_svc_names);
|
||||
svc_rpc_gss_svc_names = SLIST_HEAD_INITIALIZER(svc_rpc_gss_svc_names);
|
||||
|
||||
enum svc_rpc_gss_client_state {
|
||||
CLIENT_NEW, /* still authenticating */
|
||||
|
@ -86,7 +86,7 @@ struct cgchain {
|
||||
|
||||
#define MAX_CACHED_CGS 1024
|
||||
static unsigned ncgs = 0;
|
||||
static LIST_HEAD(, cgchain) cglist = LIST_HEAD_INITIALIZER(&cglist);
|
||||
static LIST_HEAD(, cgchain) cglist = LIST_HEAD_INITIALIZER(cglist);
|
||||
|
||||
static const char *devnam;
|
||||
static struct uufsd *disk = NULL;
|
||||
|
@ -99,8 +99,8 @@ static TAILQ_HEAD(, ggd_request) outqueue = TAILQ_HEAD_INITIALIZER(outqueue);
|
||||
pthread_mutex_t inqueue_mtx, outqueue_mtx;
|
||||
pthread_cond_t inqueue_cond, outqueue_cond;
|
||||
|
||||
static SLIST_HEAD(, ggd_export) exports = SLIST_HEAD_INITIALIZER(&exports);
|
||||
static LIST_HEAD(, ggd_connection) connections = LIST_HEAD_INITIALIZER(&connection);
|
||||
static SLIST_HEAD(, ggd_export) exports = SLIST_HEAD_INITIALIZER(exports);
|
||||
static LIST_HEAD(, ggd_connection) connections = LIST_HEAD_INITIALIZER(connections);
|
||||
|
||||
static void *recv_thread(void *arg);
|
||||
static void *disk_thread(void *arg);
|
||||
|
@ -68,7 +68,7 @@ struct instance {
|
||||
int divertInOut;
|
||||
};
|
||||
|
||||
static LIST_HEAD(, instance) root = LIST_HEAD_INITIALIZER(&root);
|
||||
static LIST_HEAD(, instance) root = LIST_HEAD_INITIALIZER(root);
|
||||
|
||||
struct libalias *mla;
|
||||
struct instance *mip;
|
||||
|
@ -42,7 +42,7 @@ __RCSID("$Revision: 2.27 $");
|
||||
#endif
|
||||
|
||||
struct ifhead ifnet = LIST_HEAD_INITIALIZER(ifnet); /* all interfaces */
|
||||
struct ifhead remote_if = LIST_HEAD_INITIALIZER(ifnet); /* remote interfaces */
|
||||
struct ifhead remote_if = LIST_HEAD_INITIALIZER(remote_if); /* remote interfaces */
|
||||
|
||||
/* hash table for all interfaces, big enough to tolerate ridiculous
|
||||
* numbers of IP aliases. Crazy numbers of aliases such as 7000
|
||||
|
@ -67,7 +67,7 @@ struct opened_dev {
|
||||
SLIST_ENTRY(opened_dev) link;
|
||||
};
|
||||
|
||||
SLIST_HEAD(, opened_dev) opened_devs = SLIST_HEAD_INITIALIZER(opened_dev);
|
||||
SLIST_HEAD(, opened_dev) opened_devs = SLIST_HEAD_INITIALIZER(opened_devs);
|
||||
|
||||
static int
|
||||
ofwd_init(void)
|
||||
|
@ -94,7 +94,7 @@ struct ksyms_softc {
|
||||
static struct mtx ksyms_mtx;
|
||||
static struct cdev *ksyms_dev;
|
||||
static LIST_HEAD(, ksyms_softc) ksyms_list =
|
||||
LIST_HEAD_INITIALIZER(&ksyms_list);
|
||||
LIST_HEAD_INITIALIZER(ksyms_list);
|
||||
|
||||
static const char ksyms_shstrtab[] =
|
||||
"\0" STR_SYMTAB "\0" STR_STRTAB "\0" STR_SHSTRTAB "\0";
|
||||
|
@ -40,7 +40,7 @@ struct ledsc {
|
||||
static struct unrhdr *led_unit;
|
||||
static struct mtx led_mtx;
|
||||
static struct sx led_sx;
|
||||
static LIST_HEAD(, ledsc) led_list = LIST_HEAD_INITIALIZER(&led_list);
|
||||
static LIST_HEAD(, ledsc) led_list = LIST_HEAD_INITIALIZER(led_list);
|
||||
static struct callout led_ch;
|
||||
|
||||
static MALLOC_DEFINE(M_LED, "LED", "LED driver");
|
||||
|
@ -152,7 +152,7 @@ struct g_class g_md_class = {
|
||||
DECLARE_GEOM_CLASS(g_md_class, g_md);
|
||||
|
||||
|
||||
static LIST_HEAD(, md_s) md_softc_list = LIST_HEAD_INITIALIZER(&md_softc_list);
|
||||
static LIST_HEAD(, md_s) md_softc_list = LIST_HEAD_INITIALIZER(md_softc_list);
|
||||
|
||||
#define NINDIR (PAGE_SIZE / sizeof(uintptr_t))
|
||||
#define NMASK (NINDIR-1)
|
||||
|
@ -220,7 +220,7 @@ MTX_SYSINIT(pcm_syncgroup, &snd_pcm_syncgroups_mtx, "PCM channel sync group lock
|
||||
*
|
||||
* See SNDCTL_DSP_SYNCGROUP for more information.
|
||||
*/
|
||||
struct pcm_synclist snd_pcm_syncgroups = SLIST_HEAD_INITIALIZER(head);
|
||||
struct pcm_synclist snd_pcm_syncgroups = SLIST_HEAD_INITIALIZER(snd_pcm_syncgroups);
|
||||
|
||||
static void
|
||||
chn_lockinit(struct pcm_channel *c, int dir)
|
||||
|
@ -79,7 +79,7 @@ static int sndstat_files = 0;
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
static SLIST_HEAD(, sndstat_entry) sndstat_devlist = SLIST_HEAD_INITIALIZER(none);
|
||||
static SLIST_HEAD(, sndstat_entry) sndstat_devlist = SLIST_HEAD_INITIALIZER(sndstat_devlist);
|
||||
|
||||
int snd_verbose = 1;
|
||||
TUNABLE_INT("hw.snd.verbose", &snd_verbose);
|
||||
|
@ -72,7 +72,7 @@ static struct cdevsw g_gate_cdevsw = {
|
||||
|
||||
|
||||
static LIST_HEAD(, g_gate_softc) g_gate_list =
|
||||
LIST_HEAD_INITIALIZER(&g_gate_list);
|
||||
LIST_HEAD_INITIALIZER(g_gate_list);
|
||||
static struct mtx g_gate_list_mtx;
|
||||
|
||||
|
||||
|
@ -76,7 +76,7 @@ MALLOC_DEFINE(M_SSC, "ssc_disk", "Simulator Disk");
|
||||
|
||||
static d_strategy_t sscstrategy;
|
||||
|
||||
static LIST_HEAD(, ssc_s) ssc_softc_list = LIST_HEAD_INITIALIZER(&ssc_softc_list);
|
||||
static LIST_HEAD(, ssc_s) ssc_softc_list = LIST_HEAD_INITIALIZER(ssc_softc_list);
|
||||
|
||||
struct ssc_s {
|
||||
int unit;
|
||||
|
@ -63,7 +63,7 @@ static struct cdev *make_dev_credv(int flags,
|
||||
static struct cdev_priv_list cdevp_free_list =
|
||||
TAILQ_HEAD_INITIALIZER(cdevp_free_list);
|
||||
static SLIST_HEAD(free_cdevsw, cdevsw) cdevsw_gt_post_list =
|
||||
SLIST_HEAD_INITIALIZER();
|
||||
SLIST_HEAD_INITIALIZER(cdevsw_gt_post_list);
|
||||
|
||||
void
|
||||
dev_lock(void)
|
||||
|
@ -87,7 +87,7 @@ struct prison prison0 = {
|
||||
.pr_securelevel = -1,
|
||||
.pr_childmax = JAIL_MAX,
|
||||
.pr_hostuuid = DEFAULT_HOSTUUID,
|
||||
.pr_children = LIST_HEAD_INITIALIZER(&prison0.pr_children),
|
||||
.pr_children = LIST_HEAD_INITIALIZER(prison0.pr_children),
|
||||
#ifdef VIMAGE
|
||||
.pr_flags = PR_HOST|PR_VNET,
|
||||
#else
|
||||
|
@ -54,7 +54,7 @@ MTX_SYSINIT(accept_filter, &accept_filter_mtx, "accept_filter_mtx",
|
||||
#define ACCEPT_FILTER_UNLOCK() mtx_unlock(&accept_filter_mtx)
|
||||
|
||||
static SLIST_HEAD(, accept_filter) accept_filtlsthd =
|
||||
SLIST_HEAD_INITIALIZER(&accept_filtlsthd);
|
||||
SLIST_HEAD_INITIALIZER(accept_filtlsthd);
|
||||
|
||||
MALLOC_DEFINE(M_ACCF, "accf", "accept filter data");
|
||||
|
||||
|
@ -1354,7 +1354,7 @@ struct root_hold_token {
|
||||
};
|
||||
|
||||
static LIST_HEAD(, root_hold_token) root_holds =
|
||||
LIST_HEAD_INITIALIZER(&root_holds);
|
||||
LIST_HEAD_INITIALIZER(root_holds);
|
||||
|
||||
static int root_mount_complete;
|
||||
|
||||
|
@ -771,18 +771,18 @@ struct unimem_debug {
|
||||
LIST_HEAD(unimem_debug_list, unimem_debug);
|
||||
|
||||
static struct unimem_debug_list nguni_freemem[UNIMEM_TYPES] = {
|
||||
LIST_HEAD_INITIALIZER(unimem_debug),
|
||||
LIST_HEAD_INITIALIZER(unimem_debug),
|
||||
LIST_HEAD_INITIALIZER(unimem_debug),
|
||||
LIST_HEAD_INITIALIZER(unimem_debug),
|
||||
LIST_HEAD_INITIALIZER(unimem_debug),
|
||||
LIST_HEAD_INITIALIZER(nguni_freemem[0]),
|
||||
LIST_HEAD_INITIALIZER(nguni_freemem[1]),
|
||||
LIST_HEAD_INITIALIZER(nguni_freemem[2]),
|
||||
LIST_HEAD_INITIALIZER(nguni_freemem[3]),
|
||||
LIST_HEAD_INITIALIZER(nguni_freemem[4]),
|
||||
};
|
||||
static struct unimem_debug_list nguni_usedmem[UNIMEM_TYPES] = {
|
||||
LIST_HEAD_INITIALIZER(unimem_debug),
|
||||
LIST_HEAD_INITIALIZER(unimem_debug),
|
||||
LIST_HEAD_INITIALIZER(unimem_debug),
|
||||
LIST_HEAD_INITIALIZER(unimem_debug),
|
||||
LIST_HEAD_INITIALIZER(unimem_debug),
|
||||
LIST_HEAD_INITIALIZER(nguni_usedmem[0]),
|
||||
LIST_HEAD_INITIALIZER(nguni_usedmem[1]),
|
||||
LIST_HEAD_INITIALIZER(nguni_usedmem[2]),
|
||||
LIST_HEAD_INITIALIZER(nguni_usedmem[3]),
|
||||
LIST_HEAD_INITIALIZER(nguni_usedmem[4]),
|
||||
};
|
||||
|
||||
static struct mtx nguni_unilist_mtx;
|
||||
|
@ -120,7 +120,7 @@ struct ng_node ng_deadnode = {
|
||||
0, /* numhooks */
|
||||
NULL, /* private */
|
||||
0, /* ID */
|
||||
LIST_HEAD_INITIALIZER(ng_deadnode.hooks),
|
||||
LIST_HEAD_INITIALIZER(ng_deadnode.nd_hooks),
|
||||
{}, /* all_nodes list entry */
|
||||
{}, /* id hashtable list entry */
|
||||
{ 0,
|
||||
|
@ -103,7 +103,7 @@ static void encap_fillarg(struct mbuf *, const struct encaptab *);
|
||||
*/
|
||||
static struct mtx encapmtx;
|
||||
MTX_SYSINIT(encapmtx, &encapmtx, "encapmtx", MTX_DEF);
|
||||
LIST_HEAD(, encaptab) encaptab = LIST_HEAD_INITIALIZER(&encaptab);
|
||||
LIST_HEAD(, encaptab) encaptab = LIST_HEAD_INITIALIZER(encaptab);
|
||||
|
||||
/*
|
||||
* We currently keey encap_init() for source code compatibility reasons --
|
||||
|
@ -52,11 +52,11 @@ __FBSDID("$FreeBSD$");
|
||||
#endif
|
||||
|
||||
/* Protocol and userland module handlers chains. */
|
||||
LIST_HEAD(handler_chain, proto_handler) handler_chain = LIST_HEAD_INITIALIZER(foo);
|
||||
LIST_HEAD(handler_chain, proto_handler) handler_chain = LIST_HEAD_INITIALIZER(handler_chain);
|
||||
#ifdef _KERNEL
|
||||
struct rwlock handler_rw;
|
||||
#endif
|
||||
SLIST_HEAD(dll_chain, dll) dll_chain = SLIST_HEAD_INITIALIZER(foo);
|
||||
SLIST_HEAD(dll_chain, dll) dll_chain = SLIST_HEAD_INITIALIZER(dll_chain);
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
|
@ -100,7 +100,7 @@ struct svc_rpc_gss_callback {
|
||||
rpc_gss_callback_t cb_callback;
|
||||
};
|
||||
static SLIST_HEAD(svc_rpc_gss_callback_list, svc_rpc_gss_callback)
|
||||
svc_rpc_gss_callbacks = SLIST_HEAD_INITIALIZER(&svc_rpc_gss_callbacks);
|
||||
svc_rpc_gss_callbacks = SLIST_HEAD_INITIALIZER(svc_rpc_gss_callbacks);
|
||||
|
||||
struct svc_rpc_gss_svc_name {
|
||||
SLIST_ENTRY(svc_rpc_gss_svc_name) sn_link;
|
||||
@ -112,7 +112,7 @@ struct svc_rpc_gss_svc_name {
|
||||
u_int sn_version;
|
||||
};
|
||||
static SLIST_HEAD(svc_rpc_gss_svc_name_list, svc_rpc_gss_svc_name)
|
||||
svc_rpc_gss_svc_names = SLIST_HEAD_INITIALIZER(&svc_rpc_gss_svc_names);
|
||||
svc_rpc_gss_svc_names = SLIST_HEAD_INITIALIZER(svc_rpc_gss_svc_names);
|
||||
|
||||
enum svc_rpc_gss_client_state {
|
||||
CLIENT_NEW, /* still authenticating */
|
||||
|
@ -122,14 +122,14 @@ static MALLOC_DEFINE(M_UMAHASH, "UMAHash", "UMA Hash Buckets");
|
||||
static int bucketdisable = 1;
|
||||
|
||||
/* Linked list of all kegs in the system */
|
||||
static LIST_HEAD(,uma_keg) uma_kegs = LIST_HEAD_INITIALIZER(&uma_kegs);
|
||||
static LIST_HEAD(,uma_keg) uma_kegs = LIST_HEAD_INITIALIZER(uma_kegs);
|
||||
|
||||
/* This mutex protects the keg list */
|
||||
static struct mtx uma_mtx;
|
||||
|
||||
/* Linked list of boot time pages */
|
||||
static LIST_HEAD(,uma_slab) uma_boot_pages =
|
||||
LIST_HEAD_INITIALIZER(&uma_boot_pages);
|
||||
LIST_HEAD_INITIALIZER(uma_boot_pages);
|
||||
|
||||
/* This mutex protects the boot time pages list */
|
||||
static struct mtx uma_boot_pages_mtx;
|
||||
|
@ -74,7 +74,7 @@ struct ref {
|
||||
char *k2;
|
||||
};
|
||||
|
||||
LIST_HEAD(, ref) refs = LIST_HEAD_INITIALIZER(&refs);
|
||||
LIST_HEAD(, ref) refs = LIST_HEAD_INITIALIZER(refs);
|
||||
|
||||
static struct node *
|
||||
new_node(void)
|
||||
|
@ -83,7 +83,7 @@ struct datadir {
|
||||
const char *path;
|
||||
SLIST_ENTRY(datadir) next;
|
||||
};
|
||||
static SLIST_HEAD(, datadir) datadirs = SLIST_HEAD_INITIALIZER(&datadirs);
|
||||
static SLIST_HEAD(, datadir) datadirs = SLIST_HEAD_INITIALIZER(datadirs);
|
||||
|
||||
struct ucode_handler {
|
||||
ucode_probe_t *probe;
|
||||
|
@ -141,7 +141,7 @@ struct pmcstat_pmcrecord {
|
||||
};
|
||||
|
||||
static LIST_HEAD(,pmcstat_pmcrecord) pmcstat_pmcs =
|
||||
LIST_HEAD_INITIALIZER(&pmcstat_pmcs);
|
||||
LIST_HEAD_INITIALIZER(pmcstat_pmcs);
|
||||
|
||||
|
||||
/*
|
||||
|
@ -98,14 +98,14 @@ struct socklistent {
|
||||
SLIST_ENTRY(socklistent) sle_next;
|
||||
};
|
||||
static SLIST_HEAD(, socklistent) sle_head =
|
||||
SLIST_HEAD_INITIALIZER(&sle_head);
|
||||
SLIST_HEAD_INITIALIZER(sle_head);
|
||||
|
||||
struct bindaddrlistent {
|
||||
const char *ble_hostname;
|
||||
SLIST_ENTRY(bindaddrlistent) ble_next;
|
||||
};
|
||||
static SLIST_HEAD(, bindaddrlistent) ble_head =
|
||||
SLIST_HEAD_INITIALIZER(&ble_head);
|
||||
SLIST_HEAD_INITIALIZER(ble_head);
|
||||
|
||||
static char *servname = "0";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user