diff options
author | Joseph Myers <joseph@codesourcery.com> | 2019-02-26 15:01:50 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2019-02-26 15:01:50 +0000 |
commit | aa0e46636a5b71b609a41e9ab97134cd76ac1522 (patch) | |
tree | 5dc47d4cf09cc97a969369243023513145f7afad /sysdeps/mach/hurd/fork.c | |
parent | e0cb7b6131ee5f2dca2938069b8b9590304e6f6b (diff) | |
download | glibc-aa0e46636a5b71b609a41e9ab97134cd76ac1522.zip glibc-aa0e46636a5b71b609a41e9ab97134cd76ac1522.tar.gz glibc-aa0e46636a5b71b609a41e9ab97134cd76ac1522.tar.bz2 |
Break further lines before not after operators.
This patch continues the process of fixing coding style to break lines
before not after operators in accordance with the GNU Coding
Standards, fixing such issues in a non-exhaustive selection of sysdeps
files that had them.
Tested for x86_64, and with build-many-glibcs.py.
* sysdeps/arm/sysdep.h (#if condition): Break lines before rather
than after operators.
* sysdeps/mach/hurd/fork.c (__fork): Likewise.
* sysdeps/mach/hurd/getcwd.c
(__hurd_canonicalize_directory_name_internal): Likewise.
* sysdeps/mach/hurd/htl/pt-mutex-consistent.c
(pthread_mutex_consistent): Likewise.
* sysdeps/mach/hurd/htl/pt-mutex-init.c (_pthread_mutex_init):
Likewise.
* sysdeps/mach/hurd/htl/pt-mutex-transfer-np.c
(__pthread_mutex_transfer_np): Likewise.
* sysdeps/mach/hurd/htl/pt-mutex-unlock.c
(__pthread_mutex_unlock): Likewise.
* sysdeps/mach/hurd/htl/pt-mutex.h (ROBUST_LOCK): Likewise.
(mtx_owned_p): Likewise.
* sysdeps/mach/hurd/htl/pt-mutexattr-getrobust.c
(pthread_mutexattr_getrobust): Likewise.
* sysdeps/mach/hurd/i386/init-first.c (init1): Likewise.
* sysdeps/mach/hurd/i386/trampoline.c (_hurd_setup_sighandler):
Likewise.
* sysdeps/mach/hurd/ioctl.c (__ioctl): Likewise.
* sysdeps/mach/hurd/jmp-unwind.c (_longjmp_unwind): Likewise.
* sysdeps/mach/hurd/kill.c (__kill): Likewise.
* sysdeps/mach/hurd/mig-reply.c (__mig_get_reply_port): Likewise.
* sysdeps/mach/hurd/ptrace.c (ptrace): Likewise.
* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Likewise.
* sysdeps/unix/sysv/linux/aarch64/sysdep.h (#if condition):
Likewise.
* sysdeps/unix/sysv/linux/alpha/ioperm.c (process_cpuinfo):
Likewise.
* sysdeps/unix/sysv/linux/bits/timex.h (STA_RONLY): Likewise.
* sysdeps/unix/sysv/linux/csky/sysdep.h (#if condition): Likewise.
* sysdeps/unix/sysv/linux/generic/____longjmp_chk.c
(____longjmp_chk): Likewise.
* sysdeps/unix/sysv/linux/generic/futimesat.c (futimesat):
Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
(INTERNAL_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
(INTERNAL_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
(__get_clockfreq_via_cpuinfo): Likewise.
Diffstat (limited to 'sysdeps/mach/hurd/fork.c')
-rw-r--r-- | sysdeps/mach/hurd/fork.c | 72 |
1 files changed, 37 insertions, 35 deletions
diff --git a/sysdeps/mach/hurd/fork.c b/sysdeps/mach/hurd/fork.c index 4b3419e..5869e67 100644 --- a/sysdeps/mach/hurd/fork.c +++ b/sysdeps/mach/hurd/fork.c @@ -271,11 +271,11 @@ __fork (void) port, MACH_MSG_TYPE_MOVE_SEND)) LOSE; - if (refs > 1 && - (err = __mach_port_mod_refs (newtask, - portnames[i], - MACH_PORT_RIGHT_SEND, - refs - 1))) + if (refs > 1 + && (err = __mach_port_mod_refs (newtask, + portnames[i], + MACH_PORT_RIGHT_SEND, + refs - 1))) LOSE; } if (porttypes[i] & MACH_PORT_TYPE_SEND_ONCE) @@ -297,8 +297,8 @@ __fork (void) LOSE; } } - else if (porttypes[i] & - (MACH_PORT_TYPE_SEND|MACH_PORT_TYPE_DEAD_NAME)) + else if (porttypes[i] + & (MACH_PORT_TYPE_SEND|MACH_PORT_TYPE_DEAD_NAME)) { /* This is a send right or a dead name. Give the child as many references for it as we have. */ @@ -367,8 +367,8 @@ __fork (void) LOSE; if (insert == MACH_PORT_NULL) continue; - if (insert == portnames[i] && - (porttypes[i] & MACH_PORT_TYPE_DEAD_NAME)) + if (insert == portnames[i] + && (porttypes[i] & MACH_PORT_TYPE_DEAD_NAME)) /* This is a dead name; allocate another dead name with the same name in the child. */ allocate_dead_name: @@ -393,10 +393,10 @@ __fork (void) assert (__mach_port_extract_right (newtask, portnames[i], MACH_MSG_TYPE_COPY_SEND, &childport, - &poly) == 0 && - childport == insert && - __mach_port_deallocate (__mach_task_self (), - childport) == 0); + &poly) == 0 + && childport == insert + && __mach_port_deallocate (__mach_task_self (), + childport) == 0); break; } @@ -411,11 +411,11 @@ __fork (void) case KERN_SUCCESS: /* Give the child as many user references as we have. */ - if (refs > 1 && - (err = __mach_port_mod_refs (newtask, - portnames[i], - MACH_PORT_RIGHT_SEND, - refs - 1))) + if (refs > 1 + && (err = __mach_port_mod_refs (newtask, + portnames[i], + MACH_PORT_RIGHT_SEND, + refs - 1))) LOSE; } } @@ -432,33 +432,35 @@ __fork (void) resume_threads (); /* Create the child main user thread and signal thread. */ - if ((err = __thread_create (newtask, &thread)) || - (err = __thread_create (newtask, &sigthread))) + if ((err = __thread_create (newtask, &thread)) + || (err = __thread_create (newtask, &sigthread))) LOSE; /* Insert send rights for those threads. We previously allocated dead name rights with the names we want to give the thread ports in the child as placeholders. Now deallocate them so we can use the names. */ - if ((err = __mach_port_deallocate (newtask, ss->thread)) || - (err = __mach_port_insert_right (newtask, ss->thread, - thread, MACH_MSG_TYPE_COPY_SEND))) + if ((err = __mach_port_deallocate (newtask, ss->thread)) + || (err = __mach_port_insert_right (newtask, ss->thread, + thread, + MACH_MSG_TYPE_COPY_SEND))) LOSE; - if (thread_refs > 1 && - (err = __mach_port_mod_refs (newtask, ss->thread, - MACH_PORT_RIGHT_SEND, - thread_refs - 1))) + if (thread_refs > 1 + && (err = __mach_port_mod_refs (newtask, ss->thread, + MACH_PORT_RIGHT_SEND, + thread_refs - 1))) LOSE; if ((_hurd_msgport_thread != MACH_PORT_NULL) /* Let user have none. */ - && ((err = __mach_port_deallocate (newtask, _hurd_msgport_thread)) || - (err = __mach_port_insert_right (newtask, _hurd_msgport_thread, - sigthread, - MACH_MSG_TYPE_COPY_SEND)))) + && ((err = __mach_port_deallocate (newtask, _hurd_msgport_thread)) + || (err = __mach_port_insert_right (newtask, + _hurd_msgport_thread, + sigthread, + MACH_MSG_TYPE_COPY_SEND)))) LOSE; - if (sigthread_refs > 1 && - (err = __mach_port_mod_refs (newtask, _hurd_msgport_thread, - MACH_PORT_RIGHT_SEND, - sigthread_refs - 1))) + if (sigthread_refs > 1 + && (err = __mach_port_mod_refs (newtask, _hurd_msgport_thread, + MACH_PORT_RIGHT_SEND, + sigthread_refs - 1))) LOSE; /* This seems like a convenient juncture to copy the proc server's |