Author: jamie
Date: Thu Apr 14 17:07:26 2016
New Revision: 297976
URL: https://svnweb.freebsd.org/changeset/base/297976

Log:
  Clean up some style(9) violations.

Modified:
  head/sys/kern/uipc_mqueue.c
  head/sys/kern/uipc_sem.c
  head/sys/kern/uipc_shm.c

Modified: head/sys/kern/uipc_mqueue.c
==============================================================================
--- head/sys/kern/uipc_mqueue.c Thu Apr 14 17:06:37 2016        (r297975)
+++ head/sys/kern/uipc_mqueue.c Thu Apr 14 17:07:26 2016        (r297976)
@@ -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 "..").

Modified: head/sys/kern/uipc_sem.c
==============================================================================
--- head/sys/kern/uipc_sem.c    Thu Apr 14 17:06:37 2016        (r297975)
+++ head/sys/kern/uipc_sem.c    Thu Apr 14 17:07:26 2016        (r297976)
@@ -271,13 +271,11 @@ ksem_fill_kinfo(struct file *fp, struct 
        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 cha
        } 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,

Modified: head/sys/kern/uipc_shm.c
==============================================================================
--- head/sys/kern/uipc_shm.c    Thu Apr 14 17:06:37 2016        (r297975)
+++ head/sys/kern/uipc_shm.c    Thu Apr 14 17:07:26 2016        (r297976)
@@ -727,7 +727,8 @@ kern_shm_open(struct thread *td, const c
        } 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 k
        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] == '/')
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to