summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjamie <jamie@FreeBSD.org>2016-04-14 17:07:26 +0000
committerjamie <jamie@FreeBSD.org>2016-04-14 17:07:26 +0000
commite3a9ee4ccfde92b5c56784651edff4c4f79a1499 (patch)
treec8e78568aa50689b2937e075fa4d29f286cd55f8
parent507a1d08d6d155f166c2d5d883a402701faac449 (diff)
downloadFreeBSD-src-e3a9ee4ccfde92b5c56784651edff4c4f79a1499.zip
FreeBSD-src-e3a9ee4ccfde92b5c56784651edff4c4f79a1499.tar.gz
Clean up some style(9) violations.
-rw-r--r--sys/kern/uipc_mqueue.c4
-rw-r--r--sys/kern/uipc_sem.c11
-rw-r--r--sys/kern/uipc_shm.c11
3 files changed, 13 insertions, 13 deletions
diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c
index ecc9bcf..e329ef2 100644
--- a/sys/kern/uipc_mqueue.c
+++ b/sys/kern/uipc_mqueue.c
@@ -686,7 +686,8 @@ mqfs_init(struct vfsconf *vfc)
EVENTHANDLER_PRI_ANY);
mq_fdclose = mqueue_fdclose;
p31b_setcfg(CTL_P1003_1B_MESSAGE_PASSING, _POSIX_MESSAGE_PASSING);
- /* Note current jails */
+
+ /* Note current jails. */
mqfs_osd_jail_slot = osd_jail_register(mqfs_prison_destructor, methods);
sx_slock(&allprison_lock);
TAILQ_FOREACH(pr, &allprison, pr_list)
@@ -1423,6 +1424,7 @@ mqfs_readdir(struct vop_readdir_args *ap)
LIST_FOREACH(pn, &pd->mn_children, mn_sibling) {
entry.d_reclen = sizeof(entry);
+
/*
* Only show names within the same prison root directory
* (or not associated with a prison, e.g. "." and "..").
diff --git a/sys/kern/uipc_sem.c b/sys/kern/uipc_sem.c
index efaf1e0..0ecff7c 100644
--- a/sys/kern/uipc_sem.c
+++ b/sys/kern/uipc_sem.c
@@ -271,13 +271,11 @@ ksem_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp)
mtx_unlock(&sem_lock);
if (ks->ks_path != NULL) {
sx_slock(&ksem_dict_lock);
- if (ks->ks_path != NULL)
- {
+ if (ks->ks_path != NULL) {
path = ks->ks_path;
pr_path = curthread->td_ucred->cr_prison->pr_path;
- if (strcmp(pr_path, "/") != 0)
- {
- /* Return the jail-rooted pathname */
+ if (strcmp(pr_path, "/") != 0) {
+ /* Return the jail-rooted pathname. */
pr_pathlen = strlen(pr_path);
if (strncmp(path, pr_path, pr_pathlen) == 0 &&
path[pr_pathlen] == '/')
@@ -503,7 +501,8 @@ ksem_create(struct thread *td, const char *name, semid_t *semidp, mode_t mode,
} else {
path = malloc(MAXPATHLEN, M_KSEM, M_WAITOK);
pr_path = td->td_ucred->cr_prison->pr_path;
- /* Construct a full pathname for jailed callers */
+
+ /* Construct a full pathname for jailed callers. */
pr_pathlen = strcmp(pr_path, "/") == 0 ? 0
: strlcpy(path, pr_path, MAXPATHLEN);
error = copyinstr(name, path + pr_pathlen,
diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c
index 3d78dc4..0657787 100644
--- a/sys/kern/uipc_shm.c
+++ b/sys/kern/uipc_shm.c
@@ -727,7 +727,8 @@ kern_shm_open(struct thread *td, const char *userpath, int flags, mode_t mode,
} else {
path = malloc(MAXPATHLEN, M_SHMFD, M_WAITOK);
pr_path = td->td_ucred->cr_prison->pr_path;
- /* Construct a full pathname for jailed callers */
+
+ /* Construct a full pathname for jailed callers. */
pr_pathlen = strcmp(pr_path, "/") == 0 ? 0
: strlcpy(path, pr_path, MAXPATHLEN);
error = copyinstr(userpath, path + pr_pathlen,
@@ -1087,13 +1088,11 @@ shm_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp)
kif->kf_un.kf_file.kf_file_size = shmfd->shm_size;
if (shmfd->shm_path != NULL) {
sx_slock(&shm_dict_lock);
- if (shmfd->shm_path != NULL)
- {
+ if (shmfd->shm_path != NULL) {
path = shmfd->shm_path;
pr_path = curthread->td_ucred->cr_prison->pr_path;
- if (strcmp(pr_path, "/") != 0)
- {
- /* Return the jail-rooted pathname */
+ if (strcmp(pr_path, "/") != 0) {
+ /* Return the jail-rooted pathname. */
pr_pathlen = strlen(pr_path);
if (strncmp(path, pr_path, pr_pathlen) == 0 &&
path[pr_pathlen] == '/')
OpenPOWER on IntegriCloud