summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2008-10-23 20:26:15 +0000
committerdes <des@FreeBSD.org>2008-10-23 20:26:15 +0000
commita1e1ad22e07d384a9609e60cdf00daf7cac902cf (patch)
tree8c9f9efa0a9f52794e2ce1fe47128f50d30f8c28
parent0b81365bc66eb70b9d9b1466012b41f8ccdec19a (diff)
downloadFreeBSD-src-a1e1ad22e07d384a9609e60cdf00daf7cac902cf.zip
FreeBSD-src-a1e1ad22e07d384a9609e60cdf00daf7cac902cf.tar.gz
Fix a number of style issues in the MALLOC / FREE commit. I've tried to
be careful not to fix anything that was already broken; the NFSv4 code is particularly bad in this respect.
-rw-r--r--sys/contrib/altq/altq/altq_hfsc.c30
-rw-r--r--sys/dev/hwpmc/hwpmc_mod.c22
-rw-r--r--sys/dev/hwpmc/hwpmc_piv.c6
-rw-r--r--sys/dev/ray/if_ray.c2
-rw-r--r--sys/dev/sr/if_sr.c2
-rw-r--r--sys/fs/hpfs/hpfs_subr.c3
-rw-r--r--sys/fs/ntfs/ntfs_subr.c3
-rw-r--r--sys/fs/ntfs/ntfs_vfsops.c2
-rw-r--r--sys/fs/udf/udf_vfsops.c6
-rw-r--r--sys/fs/unionfs/union_subr.c3
-rw-r--r--sys/kern/kern_descrip.c2
-rw-r--r--sys/kern/kern_event.c5
-rw-r--r--sys/kern/kern_linker.c4
-rw-r--r--sys/kern/kern_mtxpool.c3
-rw-r--r--sys/kern/subr_witness.c2
-rw-r--r--sys/net/if_sl.c3
-rw-r--r--sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c2
-rw-r--r--sys/netgraph/netflow/netflow.c2
-rw-r--r--sys/netgraph/ng_async.c6
-rw-r--r--sys/netgraph/ng_bridge.c11
-rw-r--r--sys/netgraph/ng_fec.c2
-rw-r--r--sys/netgraph/ng_l2tp.c3
-rw-r--r--sys/netgraph/ng_mppc.c3
-rw-r--r--sys/netinet/in_mcast.c10
-rw-r--r--sys/netinet/tcp_syncache.c4
-rw-r--r--sys/netinet6/raw_ip6.c2
-rw-r--r--sys/nfs4client/nfs4_vnops.c5
-rw-r--r--sys/nfsclient/nfs_lock.c3
-rw-r--r--sys/opencrypto/cryptodev.c14
-rw-r--r--sys/security/mac_bsdextended/mac_bsdextended.c3
-rw-r--r--sys/ufs/ffs/ffs_softdep.c6
-rw-r--r--sys/ufs/ufs/ufs_extattr.c3
32 files changed, 96 insertions, 81 deletions
diff --git a/sys/contrib/altq/altq/altq_hfsc.c b/sys/contrib/altq/altq/altq_hfsc.c
index 8beead7..cc9a566 100644
--- a/sys/contrib/altq/altq/altq_hfsc.c
+++ b/sys/contrib/altq/altq/altq_hfsc.c
@@ -202,8 +202,7 @@ hfsc_add_altq(struct pf_altq *a)
if (!ALTQ_IS_READY(&ifp->if_snd))
return (ENODEV);
- hif = malloc(sizeof(struct hfsc_if),
- M_DEVBUF, M_WAITOK);
+ hif = malloc(sizeof(struct hfsc_if), M_DEVBUF, M_WAITOK);
if (hif == NULL)
return (ENOMEM);
bzero(hif, sizeof(struct hfsc_if));
@@ -404,14 +403,12 @@ hfsc_class_create(struct hfsc_if *hif, struct service_curve *rsc,
}
#endif
- cl = malloc(sizeof(struct hfsc_class),
- M_DEVBUF, M_WAITOK);
+ cl = malloc(sizeof(struct hfsc_class), M_DEVBUF, M_WAITOK);
if (cl == NULL)
return (NULL);
bzero(cl, sizeof(struct hfsc_class));
- cl->cl_q = malloc(sizeof(class_queue_t),
- M_DEVBUF, M_WAITOK);
+ cl->cl_q = malloc(sizeof(class_queue_t), M_DEVBUF, M_WAITOK);
if (cl->cl_q == NULL)
goto err_ret;
bzero(cl->cl_q, sizeof(class_queue_t));
@@ -471,7 +468,8 @@ hfsc_class_create(struct hfsc_if *hif, struct service_curve *rsc,
#endif /* ALTQ_RED */
if (rsc != NULL && (rsc->m1 != 0 || rsc->m2 != 0)) {
- cl->cl_rsc = malloc( sizeof(struct internal_sc), M_DEVBUF, M_WAITOK);
+ cl->cl_rsc = malloc(sizeof(struct internal_sc),
+ M_DEVBUF, M_WAITOK);
if (cl->cl_rsc == NULL)
goto err_ret;
sc2isc(rsc, cl->cl_rsc);
@@ -479,14 +477,16 @@ hfsc_class_create(struct hfsc_if *hif, struct service_curve *rsc,
rtsc_init(&cl->cl_eligible, cl->cl_rsc, 0, 0);
}
if (fsc != NULL && (fsc->m1 != 0 || fsc->m2 != 0)) {
- cl->cl_fsc = malloc( sizeof(struct internal_sc), M_DEVBUF, M_WAITOK);
+ cl->cl_fsc = malloc(sizeof(struct internal_sc),
+ M_DEVBUF, M_WAITOK);
if (cl->cl_fsc == NULL)
goto err_ret;
sc2isc(fsc, cl->cl_fsc);
rtsc_init(&cl->cl_virtual, cl->cl_fsc, 0, 0);
}
if (usc != NULL && (usc->m1 != 0 || usc->m2 != 0)) {
- cl->cl_usc = malloc( sizeof(struct internal_sc), M_DEVBUF, M_WAITOK);
+ cl->cl_usc = malloc(sizeof(struct internal_sc),
+ M_DEVBUF, M_WAITOK);
if (cl->cl_usc == NULL)
goto err_ret;
sc2isc(usc, cl->cl_usc);
@@ -1740,8 +1740,7 @@ hfsc_attach(ifq, bandwidth)
{
struct hfsc_if *hif;
- hif = malloc(sizeof(struct hfsc_if),
- M_DEVBUF, M_WAITOK);
+ hif = malloc(sizeof(struct hfsc_if), M_DEVBUF, M_WAITOK);
if (hif == NULL)
return (NULL);
bzero(hif, sizeof(struct hfsc_if));
@@ -1801,19 +1800,22 @@ hfsc_class_modify(cl, rsc, fsc, usc)
rsc_tmp = fsc_tmp = usc_tmp = NULL;
if (rsc != NULL && (rsc->m1 != 0 || rsc->m2 != 0) &&
cl->cl_rsc == NULL) {
- rsc_tmp = malloc( sizeof(struct internal_sc), M_DEVBUF, M_WAITOK);
+ rsc_tmp = malloc(sizeof(struct internal_sc),
+ M_DEVBUF, M_WAITOK);
if (rsc_tmp == NULL)
return (ENOMEM);
}
if (fsc != NULL && (fsc->m1 != 0 || fsc->m2 != 0) &&
cl->cl_fsc == NULL) {
- fsc_tmp = malloc( sizeof(struct internal_sc), M_DEVBUF, M_WAITOK);
+ fsc_tmp = malloc(sizeof(struct internal_sc),
+ M_DEVBUF, M_WAITOK);
if (fsc_tmp == NULL)
return (ENOMEM);
}
if (usc != NULL && (usc->m1 != 0 || usc->m2 != 0) &&
cl->cl_usc == NULL) {
- usc_tmp = malloc( sizeof(struct internal_sc), M_DEVBUF, M_WAITOK);
+ usc_tmp = malloc(sizeof(struct internal_sc),
+ M_DEVBUF, M_WAITOK);
if (usc_tmp == NULL)
return (ENOMEM);
}
diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c
index 3bda5ba..f750d46 100644
--- a/sys/dev/hwpmc/hwpmc_mod.c
+++ b/sys/dev/hwpmc/hwpmc_mod.c
@@ -331,8 +331,7 @@ pmc_debugflags_parse(char *newstr, char *fence)
int error, found, *newbits, tmp;
size_t kwlen;
- tmpflags = malloc(sizeof(*tmpflags),
- M_PMC, M_WAITOK|M_ZERO);
+ tmpflags = malloc(sizeof(*tmpflags), M_PMC, M_WAITOK|M_ZERO);
p = newstr;
error = 0;
@@ -777,8 +776,7 @@ pmc_link_target_process(struct pmc *pm, struct pmc_process *pp)
__LINE__, pp, pm));
#endif
- pt = malloc(sizeof(struct pmc_target),
- M_PMC, M_ZERO|M_WAITOK);
+ pt = malloc(sizeof(struct pmc_target), M_PMC, M_ZERO|M_WAITOK);
pt->pt_process = pp;
@@ -1861,8 +1859,7 @@ pmc_allocate_owner_descriptor(struct proc *p)
poh = &pmc_ownerhash[hindex];
/* allocate space for N pointers and one descriptor struct */
- po = malloc(sizeof(struct pmc_owner),
- M_PMC, M_ZERO|M_WAITOK);
+ po = malloc(sizeof(struct pmc_owner), M_PMC, M_ZERO|M_WAITOK);
po->po_sscount = po->po_error = po->po_flags = 0;
po->po_file = NULL;
@@ -1915,7 +1912,7 @@ pmc_find_process_descriptor(struct proc *p, uint32_t mode)
if (mode & PMC_FLAG_ALLOCATE) {
/* allocate additional space for 'n' pmc pointers */
- ppnew = malloc( sizeof(struct pmc_process) + md->pmd_npmc *
+ ppnew = malloc(sizeof(struct pmc_process) + md->pmd_npmc *
sizeof(struct pmc_targetstate), M_PMC, M_ZERO|M_WAITOK);
}
@@ -2818,8 +2815,7 @@ pmc_syscall_handler(struct thread *td, void *syscall_args)
npmc = md->pmd_npmc;
pmcinfo_size = npmc * sizeof(struct pmc_info);
- pmcinfo = malloc(pmcinfo_size, M_PMC,
- M_WAITOK);
+ pmcinfo = malloc(pmcinfo_size, M_PMC, M_WAITOK);
p = pmcinfo;
@@ -4356,7 +4352,8 @@ pmc_initialize(void)
M_PMC, M_WAITOK|M_ZERO);
/* per-cpu 'saved values' for managing process-mode PMCs */
- pmc_pcpu_saved = malloc( sizeof(pmc_value_t) * maxcpu * md->pmd_npmc, M_PMC, M_WAITOK);
+ pmc_pcpu_saved = malloc(sizeof(pmc_value_t) * maxcpu * md->pmd_npmc,
+ M_PMC, M_WAITOK);
/* Perform CPU-dependent initialization. */
pmc_save_cpu_binding(&pb);
@@ -4376,7 +4373,7 @@ pmc_initialize(void)
for (cpu = 0; cpu < maxcpu; cpu++) {
if (!pmc_cpu_is_active(cpu))
continue;
- sb = malloc( sizeof(struct pmc_samplebuffer) +
+ sb = malloc(sizeof(struct pmc_samplebuffer) +
pmc_nsamples * sizeof(struct pmc_sample), M_PMC,
M_WAITOK|M_ZERO);
@@ -4385,7 +4382,8 @@ pmc_initialize(void)
KASSERT(pmc_pcpu[cpu] != NULL,
("[pmc,%d] cpu=%d Null per-cpu data", __LINE__, cpu));
- sb->ps_callchains = malloc( pmc_callchaindepth * pmc_nsamples * sizeof(uintptr_t),
+ sb->ps_callchains = malloc(pmc_callchaindepth *
+ pmc_nsamples * sizeof(uintptr_t),
M_PMC, M_WAITOK|M_ZERO);
for (n = 0, ps = sb->ps_samples; n < pmc_nsamples; n++, ps++)
diff --git a/sys/dev/hwpmc/hwpmc_piv.c b/sys/dev/hwpmc/hwpmc_piv.c
index 01de68c..b8f530c 100644
--- a/sys/dev/hwpmc/hwpmc_piv.c
+++ b/sys/dev/hwpmc/hwpmc_piv.c
@@ -628,7 +628,8 @@ p4_init(int cpu)
if (pcs == NULL) /* decline to init */
return ENXIO;
- plcs = malloc( sizeof(struct p4_logicalcpu), M_PMC, M_WAITOK|M_ZERO);
+ plcs = malloc(sizeof(struct p4_logicalcpu),
+ M_PMC, M_WAITOK|M_ZERO);
/* The TSC is architectural state and is not shared */
plcs->pc_hwpmcs[0] = &plcs->pc_tsc;
@@ -644,8 +645,7 @@ p4_init(int cpu)
return 0;
}
- pcs = malloc(sizeof(struct p4_cpu), M_PMC,
- M_WAITOK|M_ZERO);
+ pcs = malloc(sizeof(struct p4_cpu), M_PMC, M_WAITOK|M_ZERO);
if (pcs == NULL)
return ENOMEM;
diff --git a/sys/dev/ray/if_ray.c b/sys/dev/ray/if_ray.c
index 513312c..9706f0f 100644
--- a/sys/dev/ray/if_ray.c
+++ b/sys/dev/ray/if_ray.c
@@ -3177,7 +3177,7 @@ ray_com_malloc(ray_comqfn_t function, int flags, char *mesg)
{
struct ray_comq_entry *com;
- com = malloc( sizeof(struct ray_comq_entry), M_RAYCOM, M_WAITOK);
+ com = malloc(sizeof(struct ray_comq_entry), M_RAYCOM, M_WAITOK);
return (ray_com_init(com, function, flags, mesg));
}
diff --git a/sys/dev/sr/if_sr.c b/sys/dev/sr/if_sr.c
index 5507715..79db670 100644
--- a/sys/dev/sr/if_sr.c
+++ b/sys/dev/sr/if_sr.c
@@ -305,7 +305,7 @@ sr_attach(device_t device)
int unit; /* index: channel w/in card */
hc = (struct sr_hardc *)device_get_softc(device);
- sc = malloc( hc->numports * sizeof(struct sr_softc),
+ sc = malloc(hc->numports * sizeof(struct sr_softc),
M_DEVBUF, M_WAITOK | M_ZERO);
if (sc == NULL)
goto errexit;
diff --git a/sys/fs/hpfs/hpfs_subr.c b/sys/fs/hpfs/hpfs_subr.c
index ae9a70d..c7fe94f 100644
--- a/sys/fs/hpfs/hpfs_subr.c
+++ b/sys/fs/hpfs/hpfs_subr.c
@@ -278,7 +278,8 @@ hpfs_cpinit (
cpicnt = hpmp->hpm_sp.sp_cpinum;
- hpmp->hpm_cpdblk = malloc( cpicnt * sizeof(struct cpdblk), M_HPFSMNT, M_WAITOK);
+ hpmp->hpm_cpdblk = malloc(cpicnt * sizeof(struct cpdblk),
+ M_HPFSMNT, M_WAITOK);
cpdbp = hpmp->hpm_cpdblk;
lsn = hpmp->hpm_sp.sp_cpi;
diff --git a/sys/fs/ntfs/ntfs_subr.c b/sys/fs/ntfs/ntfs_subr.c
index e50cdf2..f715741 100644
--- a/sys/fs/ntfs/ntfs_subr.c
+++ b/sys/fs/ntfs/ntfs_subr.c
@@ -1143,7 +1143,8 @@ ntfs_ntreaddir(
if (fp->f_dirblbuf == NULL) {
fp->f_dirblsz = vap->va_a_iroot->ir_size;
- fp->f_dirblbuf = malloc( max(vap->va_datalen,fp->f_dirblsz), M_NTFSDIR, M_WAITOK);
+ fp->f_dirblbuf = malloc(max(vap->va_datalen,fp->f_dirblsz),
+ M_NTFSDIR, M_WAITOK);
}
blsize = fp->f_dirblsz;
diff --git a/sys/fs/ntfs/ntfs_vfsops.c b/sys/fs/ntfs/ntfs_vfsops.c
index 6baaca1..7b57949 100644
--- a/sys/fs/ntfs/ntfs_vfsops.c
+++ b/sys/fs/ntfs/ntfs_vfsops.c
@@ -416,7 +416,7 @@ ntfs_mountfs(devvp, mp, td)
}
/* Alloc memory for attribute definitions */
- ntmp->ntm_ad = malloc( num * sizeof(struct ntvattrdef),
+ ntmp->ntm_ad = malloc(num * sizeof(struct ntvattrdef),
M_NTFSMNT, M_WAITOK);
ntmp->ntm_adnum = num;
diff --git a/sys/fs/udf/udf_vfsops.c b/sys/fs/udf/udf_vfsops.c
index 21ab167..5120187 100644
--- a/sys/fs/udf/udf_vfsops.c
+++ b/sys/fs/udf/udf_vfsops.c
@@ -647,8 +647,7 @@ udf_vget(struct mount *mp, ino_t ino, int flags, struct vnode **vpp)
return (ENOMEM);
}
size = UDF_FENTRY_SIZE + le32toh(fe->l_ea) + le32toh(fe->l_ad);
- unode->fentry = malloc(size, M_UDFFENTRY,
- M_NOWAIT | M_ZERO);
+ unode->fentry = malloc(size, M_UDFFENTRY, M_NOWAIT | M_ZERO);
if (unode->fentry == NULL) {
printf("Cannot allocate file entry block\n");
vgone(vp);
@@ -757,7 +756,8 @@ udf_find_partmaps(struct udf_mnt *udfmp, struct logvol_desc *lvd)
pms = (struct part_map_spare *)pmap;
pmap += UDF_PMAP_TYPE2_SIZE;
- udfmp->s_table = malloc( le32toh(pms->st_size), M_UDFMOUNT, M_NOWAIT | M_ZERO);
+ udfmp->s_table = malloc(le32toh(pms->st_size),
+ M_UDFMOUNT, M_NOWAIT | M_ZERO);
if (udfmp->s_table == NULL)
return (ENOMEM);
diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c
index d4c1e60..7422de8 100644
--- a/sys/fs/unionfs/union_subr.c
+++ b/sys/fs/unionfs/union_subr.c
@@ -440,7 +440,8 @@ unionfs_get_node_status(struct unionfs_node *unp, struct thread *td,
}
/* create a new unionfs node status */
- unsp = malloc( sizeof(struct unionfs_node_status), M_TEMP, M_WAITOK | M_ZERO);
+ unsp = malloc(sizeof(struct unionfs_node_status),
+ M_TEMP, M_WAITOK | M_ZERO);
unsp->uns_pid = pid;
LIST_INSERT_HEAD(&(unp->un_unshead), unsp, uns_list);
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 4ccc37e..ec07d0f 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -2409,7 +2409,7 @@ filedesc_to_leader_alloc(struct filedesc_to_leader *old, struct filedesc *fdp, s
{
struct filedesc_to_leader *fdtol;
- fdtol = malloc( sizeof(struct filedesc_to_leader),
+ fdtol = malloc(sizeof(struct filedesc_to_leader),
M_FILEDESC_TO_LEADER,
M_WAITOK);
fdtol->fdl_refcount = 1;
diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c
index 6a631be..4acfc49 100644
--- a/sys/kern/kern_event.c
+++ b/sys/kern/kern_event.c
@@ -529,8 +529,7 @@ filt_timerattach(struct knote *kn)
kn->kn_flags |= EV_CLEAR; /* automatically set */
kn->kn_status &= ~KN_DETACHED; /* knlist_add usually sets it */
- calloutp = malloc(sizeof(*calloutp),
- M_KQUEUE, M_WAITOK);
+ calloutp = malloc(sizeof(*calloutp), M_KQUEUE, M_WAITOK);
callout_init(calloutp, CALLOUT_MPSAFE);
kn->kn_hook = calloutp;
callout_reset_curcpu(calloutp, timertoticks(kn->kn_sdata),
@@ -1109,7 +1108,7 @@ kqueue_expand(struct kqueue *kq, struct filterops *fops, uintptr_t ident,
size = kq->kq_knlistsize;
while (size <= fd)
size += KQEXTENT;
- list = malloc( size * sizeof list, M_KQUEUE, mflag);
+ list = malloc(size * sizeof list, M_KQUEUE, mflag);
if (list == NULL)
return ENOMEM;
KQ_LOCK(kq);
diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c
index 6cc5d5d..e232cdc 100644
--- a/sys/kern/kern_linker.c
+++ b/sys/kern/kern_linker.c
@@ -1893,8 +1893,8 @@ linker_hwpmc_list_objects(void)
retry:
/* allocate nmappings+1 entries */
- hc.kobase = malloc( (hc.nmappings + 1) * sizeof(struct pmckern_map_in), M_LINKER,
- M_WAITOK | M_ZERO);
+ hc.kobase = malloc((hc.nmappings + 1) * sizeof(struct pmckern_map_in),
+ M_LINKER, M_WAITOK | M_ZERO);
hc.nobjects = 0;
if (linker_file_foreach(linker_hwpmc_list_object, &hc) != 0) {
diff --git a/sys/kern/kern_mtxpool.c b/sys/kern/kern_mtxpool.c
index 6a98fea..23b41bb 100644
--- a/sys/kern/kern_mtxpool.c
+++ b/sys/kern/kern_mtxpool.c
@@ -146,7 +146,8 @@ mtx_pool_create(const char *mtx_name, int pool_size, int opts)
mtx_name);
pool_size = 128;
}
- pool = malloc( sizeof (struct mtx_pool) + ((pool_size - 1) * sizeof (struct mtx)),
+ pool = malloc(sizeof (struct mtx_pool) +
+ ((pool_size - 1) * sizeof (struct mtx)),
M_MTXPOOL, M_WAITOK | M_ZERO);
mtx_pool_initialize(pool, mtx_name, pool_size, opts);
return pool;
diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c
index 790e90f..ca28c8d 100644
--- a/sys/kern/subr_witness.c
+++ b/sys/kern/subr_witness.c
@@ -708,7 +708,7 @@ witness_initialize(void *dummy __unused)
struct witness *w, *w1;
int i;
- w_data = malloc( sizeof (struct witness) * WITNESS_COUNT, M_WITNESS,
+ w_data = malloc(sizeof (struct witness) * WITNESS_COUNT, M_WITNESS,
M_NOWAIT | M_ZERO);
/*
diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c
index f5bf533..10853e9 100644
--- a/sys/net/if_sl.c
+++ b/sys/net/if_sl.c
@@ -664,7 +664,8 @@ sltstart(struct tty *tp)
register u_char *cp;
if (sc->bpfbuf == NULL)
- sc->bpfbuf = malloc( SLTMAX + SLIP_HDRLEN, M_SL, M_NOWAIT);
+ sc->bpfbuf = malloc(SLTMAX + SLIP_HDRLEN,
+ M_SL, M_NOWAIT);
if (sc->bpfbuf) {
cp = sc->bpfbuf + SLIP_HDRLEN;
diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c
index 2d2e006..ecfa36d 100644
--- a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c
+++ b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c
@@ -377,7 +377,7 @@ ng_btsocket_l2cap_raw_input(void *context, int pending)
rt = (ng_btsocket_l2cap_rtentry_t *)
NG_HOOK_PRIVATE(hook);
if (rt == NULL) {
- rt = malloc( sizeof(*rt),
+ rt = malloc(sizeof(*rt),
M_NETGRAPH_BTSOCKET_L2CAP_RAW,
M_NOWAIT|M_ZERO);
if (rt == NULL)
diff --git a/sys/netgraph/netflow/netflow.c b/sys/netgraph/netflow/netflow.c
index bf261a9..5443629 100644
--- a/sys/netgraph/netflow/netflow.c
+++ b/sys/netgraph/netflow/netflow.c
@@ -331,7 +331,7 @@ ng_netflow_cache_init(priv_p priv)
uma_zone_set_max(priv->zone, CACHESIZE);
/* Allocate hash. */
- priv->hash = malloc( NBUCKETS * sizeof(struct flow_hash_entry),
+ priv->hash = malloc(NBUCKETS * sizeof(struct flow_hash_entry),
M_NETFLOW_HASH, M_WAITOK | M_ZERO);
if (priv->hash == NULL) {
diff --git a/sys/netgraph/ng_async.c b/sys/netgraph/ng_async.c
index 6841617..77c96df 100644
--- a/sys/netgraph/ng_async.c
+++ b/sys/netgraph/ng_async.c
@@ -190,10 +190,12 @@ nga_constructor(node_p node)
sc->cfg.accm = ~0;
sc->cfg.amru = NG_ASYNC_DEFAULT_MRU;
sc->cfg.smru = NG_ASYNC_DEFAULT_MRU;
- sc->abuf = malloc( ASYNC_BUF_SIZE(sc->cfg.smru), M_NETGRAPH_ASYNC, M_NOWAIT);
+ sc->abuf = malloc(ASYNC_BUF_SIZE(sc->cfg.smru),
+ M_NETGRAPH_ASYNC, M_NOWAIT);
if (sc->abuf == NULL)
goto fail;
- sc->sbuf = malloc( SYNC_BUF_SIZE(sc->cfg.amru), M_NETGRAPH_ASYNC, M_NOWAIT);
+ sc->sbuf = malloc(SYNC_BUF_SIZE(sc->cfg.amru),
+ M_NETGRAPH_ASYNC, M_NOWAIT);
if (sc->sbuf == NULL) {
free(sc->abuf, M_NETGRAPH_ASYNC);
fail:
diff --git a/sys/netgraph/ng_bridge.c b/sys/netgraph/ng_bridge.c
index da48f23..c033a55 100644
--- a/sys/netgraph/ng_bridge.c
+++ b/sys/netgraph/ng_bridge.c
@@ -304,7 +304,8 @@ ng_bridge_constructor(node_p node)
ng_callout_init(&priv->timer);
/* Allocate and initialize hash table, etc. */
- priv->tab = malloc( MIN_BUCKETS * sizeof(*priv->tab), M_NETGRAPH_BRIDGE, M_NOWAIT | M_ZERO);
+ priv->tab = malloc(MIN_BUCKETS * sizeof(*priv->tab),
+ M_NETGRAPH_BRIDGE, M_NOWAIT | M_ZERO);
if (priv->tab == NULL) {
free(priv, M_NETGRAPH_BRIDGE);
return (ENOMEM);
@@ -358,7 +359,8 @@ ng_bridge_newhook(node_p node, hook_p hook, const char *name)
return (EINVAL);
if (priv->links[linkNum] != NULL)
return (EISCONN);
- priv->links[linkNum] = malloc( sizeof(*priv->links[linkNum]), M_NETGRAPH_BRIDGE, M_NOWAIT|M_ZERO);
+ priv->links[linkNum] = malloc(sizeof(*priv->links[linkNum]),
+ M_NETGRAPH_BRIDGE, M_NOWAIT|M_ZERO);
if (priv->links[linkNum] == NULL)
return (ENOMEM);
priv->links[linkNum]->hook = hook;
@@ -848,7 +850,7 @@ ng_bridge_put(priv_p priv, const u_char *addr, int linkNum)
#endif
/* Allocate and initialize new hashtable entry */
- hent = malloc( sizeof(*hent), M_NETGRAPH_BRIDGE, M_NOWAIT);
+ hent = malloc(sizeof(*hent), M_NETGRAPH_BRIDGE, M_NOWAIT);
if (hent == NULL)
return (0);
bcopy(addr, hent->host.addr, ETHER_ADDR_LEN);
@@ -892,7 +894,8 @@ ng_bridge_rehash(priv_p priv)
newMask = newNumBuckets - 1;
/* Allocate and initialize new table */
- newTab = malloc( newNumBuckets * sizeof(*newTab), M_NETGRAPH_BRIDGE, M_NOWAIT | M_ZERO);
+ newTab = malloc(newNumBuckets * sizeof(*newTab),
+ M_NETGRAPH_BRIDGE, M_NOWAIT | M_ZERO);
if (newTab == NULL)
return;
diff --git a/sys/netgraph/ng_fec.c b/sys/netgraph/ng_fec.c
index 83a3462..dc4ad40 100644
--- a/sys/netgraph/ng_fec.c
+++ b/sys/netgraph/ng_fec.c
@@ -403,7 +403,7 @@ ng_fec_addport(struct ng_fec_private *priv, char *iface)
}
/* Allocate new list entry. */
- new = malloc( sizeof(struct ng_fec_portlist), M_NETGRAPH, M_NOWAIT);
+ new = malloc(sizeof(struct ng_fec_portlist), M_NETGRAPH, M_NOWAIT);
if (new == NULL)
return(ENOMEM);
diff --git a/sys/netgraph/ng_l2tp.c b/sys/netgraph/ng_l2tp.c
index 46a817c..d24b321 100644
--- a/sys/netgraph/ng_l2tp.c
+++ b/sys/netgraph/ng_l2tp.c
@@ -428,7 +428,8 @@ ng_l2tp_newhook(node_p node, hook_p hook, const char *name)
return (EINVAL);
/* Create hook private structure */
- hpriv = malloc( sizeof(*hpriv), M_NETGRAPH_L2TP, M_NOWAIT | M_ZERO);
+ hpriv = malloc(sizeof(*hpriv),
+ M_NETGRAPH_L2TP, M_NOWAIT | M_ZERO);
if (hpriv == NULL)
return (ENOMEM);
hpriv->conf.session_id = session_id;
diff --git a/sys/netgraph/ng_mppc.c b/sys/netgraph/ng_mppc.c
index 2a7198f..2e9d932 100644
--- a/sys/netgraph/ng_mppc.c
+++ b/sys/netgraph/ng_mppc.c
@@ -295,7 +295,8 @@ ng_mppc_rcvmsg(node_p node, item_p item, hook_p lasthook)
d->history = NULL;
}
if ((cfg->bits & MPPC_BIT) != 0) {
- d->history = malloc( isComp ? MPPC_SizeOfCompressionHistory() :
+ d->history = malloc(isComp ?
+ MPPC_SizeOfCompressionHistory() :
MPPC_SizeOfDecompressionHistory(),
M_NETGRAPH_MPPC, M_NOWAIT);
if (d->history == NULL)
diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c
index 16d92ce..65e6be8 100644
--- a/sys/netinet/in_mcast.c
+++ b/sys/netinet/in_mcast.c
@@ -817,7 +817,7 @@ inp_get_source_filters(struct inpcb *inp, struct sockopt *sopt)
* has asked for, but we always tell userland how big the
* buffer really needs to be.
*/
- tss = malloc( sizeof(struct sockaddr_storage) * msfr.msfr_nsrcs,
+ tss = malloc(sizeof(struct sockaddr_storage) * msfr.msfr_nsrcs,
M_TEMP, M_NOWAIT);
if (tss == NULL) {
error = ENOBUFS;
@@ -1569,7 +1569,7 @@ inp_set_source_filters(struct inpcb *inp, struct sockopt *sopt)
* that we may copy them with a single copyin. This
* allows us to deal with page faults up-front.
*/
- kss = malloc( sizeof(struct sockaddr_storage) * msfr.msfr_nsrcs,
+ kss = malloc(sizeof(struct sockaddr_storage) * msfr.msfr_nsrcs,
M_TEMP, M_WAITOK);
error = copyin(msfr.msfr_srcs, kss,
sizeof(struct sockaddr_storage) * msfr.msfr_nsrcs);
@@ -1623,7 +1623,7 @@ inp_set_source_filters(struct inpcb *inp, struct sockopt *sopt)
* entries we are about to allocate, in case we
* abruptly need to free them.
*/
- pnims = malloc( sizeof(struct in_msource *) * msfr.msfr_nsrcs,
+ pnims = malloc(sizeof(struct in_msource *) * msfr.msfr_nsrcs,
M_TEMP, M_WAITOK | M_ZERO);
/*
@@ -1634,8 +1634,8 @@ inp_set_source_filters(struct inpcb *inp, struct sockopt *sopt)
pkss = kss;
nims = NULL;
for (i = 0; i < msfr.msfr_nsrcs; i++, pkss++) {
- nims = malloc( sizeof(struct in_msource) * msfr.msfr_nsrcs,
- M_IPMSOURCE, M_WAITOK | M_ZERO);
+ nims = malloc(sizeof(struct in_msource) *
+ msfr.msfr_nsrcs, M_IPMSOURCE, M_WAITOK | M_ZERO);
pnims[i] = nims;
}
if (i < msfr.msfr_nsrcs) {
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c
index d81a24e..19c5b7e 100644
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -247,8 +247,8 @@ syncache_init(void)
&V_tcp_syncache.cache_limit);
/* Allocate the hash table. */
- V_tcp_syncache.hashbase = malloc( V_tcp_syncache.hashsize * sizeof(struct syncache_head),
- M_SYNCACHE, M_WAITOK | M_ZERO);
+ V_tcp_syncache.hashbase = malloc(V_tcp_syncache.hashsize *
+ sizeof(struct syncache_head), M_SYNCACHE, M_WAITOK | M_ZERO);
/* Initialize the hash buckets. */
for (i = 0; i < V_tcp_syncache.hashsize; i++) {
diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c
index 8b99b08..d365ec4 100644
--- a/sys/netinet6/raw_ip6.c
+++ b/sys/netinet6/raw_ip6.c
@@ -565,7 +565,7 @@ rip6_attach(struct socket *so, int proto, struct thread *td)
error = soreserve(so, rip_sendspace, rip_recvspace);
if (error)
return (error);
- filter = malloc( sizeof(struct icmp6_filter), M_PCB, M_NOWAIT);
+ filter = malloc(sizeof(struct icmp6_filter), M_PCB, M_NOWAIT);
if (filter == NULL)
return (ENOMEM);
INP_INFO_WLOCK(&V_ripcbinfo);
diff --git a/sys/nfs4client/nfs4_vnops.c b/sys/nfs4client/nfs4_vnops.c
index db2b30a..9a28da3 100644
--- a/sys/nfs4client/nfs4_vnops.c
+++ b/sys/nfs4client/nfs4_vnops.c
@@ -2235,8 +2235,7 @@ nfs4_sillyrename(struct vnode *dvp, struct vnode *vp, struct componentname *cnp)
if (vp->v_type == VDIR)
panic("nfs: sillyrename dir");
#endif
- sp = malloc(sizeof (struct sillyrename),
- M_NFSREQ, M_WAITOK);
+ sp = malloc(sizeof (struct sillyrename), M_NFSREQ, M_WAITOK);
sp->s_cred = crhold(cnp->cn_cred);
sp->s_dvp = dvp;
sp->s_removeit = nfs4_removeit;
@@ -2352,7 +2351,7 @@ nfs4_lookitup(struct vnode *dvp, const char *name, int len, struct ucred *cred,
np->n_namelen = len;
if (np->n_name != NULL)
free(np->n_name, M_NFSREQ);
- np->n_name = malloc( np->n_namelen + 1, M_NFSREQ, M_WAITOK);
+ np->n_name = malloc(np->n_namelen + 1, M_NFSREQ, M_WAITOK);
memcpy(np->n_name, name, len);
np->n_name[len] = '\0';
}
diff --git a/sys/nfsclient/nfs_lock.c b/sys/nfsclient/nfs_lock.c
index 45614b5..19ad066 100644
--- a/sys/nfsclient/nfs_lock.c
+++ b/sys/nfsclient/nfs_lock.c
@@ -281,7 +281,8 @@ nfs_dolock(struct vop_advlock_args *ap)
* if there is no nfsowner table yet, allocate one.
*/
if (p->p_nlminfo == NULL) {
- p->p_nlminfo = malloc( sizeof(struct nlminfo), M_NLMINFO, M_WAITOK | M_ZERO);
+ p->p_nlminfo = malloc(sizeof(struct nlminfo),
+ M_NLMINFO, M_WAITOK | M_ZERO);
p->p_nlminfo->pid_start = p->p_stats->p_start;
timevaladd(&p->p_nlminfo->pid_start, &boottime);
}
diff --git a/sys/opencrypto/cryptodev.c b/sys/opencrypto/cryptodev.c
index ad314fb..73280cc 100644
--- a/sys/opencrypto/cryptodev.c
+++ b/sys/opencrypto/cryptodev.c
@@ -267,7 +267,8 @@ cryptof_ioctl(
goto bail;
}
- crie.cri_key = malloc( crie.cri_klen / 8, M_XDATA, M_WAITOK);
+ crie.cri_key = malloc(crie.cri_klen / 8,
+ M_XDATA, M_WAITOK);
if ((error = copyin(sop->key, crie.cri_key,
crie.cri_klen / 8)))
goto bail;
@@ -284,7 +285,8 @@ cryptof_ioctl(
}
if (cria.cri_klen) {
- cria.cri_key = malloc( cria.cri_klen / 8, M_XDATA, M_WAITOK);
+ cria.cri_key = malloc(cria.cri_klen / 8,
+ M_XDATA, M_WAITOK);
if ((error = copyin(sop->mackey, cria.cri_key,
cria.cri_klen / 8)))
goto bail;
@@ -776,11 +778,9 @@ csecreate(struct fcrypt *fcr, u_int64_t sid, caddr_t key, u_int64_t keylen,
#ifdef INVARIANTS
/* NB: required when mtx_init is built with INVARIANTS */
- cse = malloc(sizeof(struct csession),
- M_XDATA, M_NOWAIT | M_ZERO);
+ cse = malloc(sizeof(struct csession), M_XDATA, M_NOWAIT | M_ZERO);
#else
- cse = malloc(sizeof(struct csession),
- M_XDATA, M_NOWAIT);
+ cse = malloc(sizeof(struct csession), M_XDATA, M_NOWAIT);
#endif
if (cse == NULL)
return NULL;
@@ -840,7 +840,7 @@ cryptoioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread
switch (cmd) {
case CRIOGET:
- fcr = malloc( sizeof(struct fcrypt), M_XDATA, M_WAITOK);
+ fcr = malloc(sizeof(struct fcrypt), M_XDATA, M_WAITOK);
TAILQ_INIT(&fcr->csessions);
fcr->sesn = 0;
diff --git a/sys/security/mac_bsdextended/mac_bsdextended.c b/sys/security/mac_bsdextended/mac_bsdextended.c
index e9d7901..e7997ba 100644
--- a/sys/security/mac_bsdextended/mac_bsdextended.c
+++ b/sys/security/mac_bsdextended/mac_bsdextended.c
@@ -152,7 +152,8 @@ sysctl_rule(SYSCTL_HANDLER_ARGS)
error = SYSCTL_IN(req, &temprule, sizeof(temprule));
if (error)
return (error);
- ruleptr = malloc( sizeof(*ruleptr), M_MACBSDEXTENDED, M_WAITOK | M_ZERO);
+ ruleptr = malloc(sizeof(*ruleptr), M_MACBSDEXTENDED,
+ M_WAITOK | M_ZERO);
}
mtx_lock(&ugidfw_mtx);
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c
index 460c1df..ab6df0f 100644
--- a/sys/ufs/ffs/ffs_softdep.c
+++ b/sys/ufs/ffs/ffs_softdep.c
@@ -3920,7 +3920,8 @@ initiate_write_inodeblock_ufs1(inodedep, bp)
if (inodedep->id_savedino1 != NULL)
panic("initiate_write_inodeblock_ufs1: I/O underway");
FREE_LOCK(&lk);
- sip = malloc( sizeof(struct ufs1_dinode), M_SAVEDINO, M_SOFTDEP_FLAGS);
+ sip = malloc(sizeof(struct ufs1_dinode),
+ M_SAVEDINO, M_SOFTDEP_FLAGS);
ACQUIRE_LOCK(&lk);
inodedep->id_savedino1 = sip;
*inodedep->id_savedino1 = *dp;
@@ -4065,7 +4066,8 @@ initiate_write_inodeblock_ufs2(inodedep, bp)
if (inodedep->id_savedino2 != NULL)
panic("initiate_write_inodeblock_ufs2: I/O underway");
FREE_LOCK(&lk);
- sip = malloc( sizeof(struct ufs2_dinode), M_SAVEDINO, M_SOFTDEP_FLAGS);
+ sip = malloc(sizeof(struct ufs2_dinode),
+ M_SAVEDINO, M_SOFTDEP_FLAGS);
ACQUIRE_LOCK(&lk);
inodedep->id_savedino2 = sip;
*inodedep->id_savedino2 = *dp;
diff --git a/sys/ufs/ufs/ufs_extattr.c b/sys/ufs/ufs/ufs_extattr.c
index 88f955b..b991920 100644
--- a/sys/ufs/ufs/ufs_extattr.c
+++ b/sys/ufs/ufs/ufs_extattr.c
@@ -588,7 +588,8 @@ ufs_extattr_enable(struct ufsmount *ump, int attrnamespace,
if (backing_vnode->v_type != VREG)
return (EINVAL);
- attribute = malloc( sizeof(struct ufs_extattr_list_entry), M_UFS_EXTATTR, M_WAITOK);
+ attribute = malloc(sizeof(struct ufs_extattr_list_entry),
+ M_UFS_EXTATTR, M_WAITOK);
if (attribute == NULL)
return (ENOMEM);
OpenPOWER on IntegriCloud