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 | |
parent | e0cb7b6131ee5f2dca2938069b8b9590304e6f6b (diff) | |
download | glibc-aa0e46636a5b71b609a41e9ab97134cd76ac1522.tar glibc-aa0e46636a5b71b609a41e9ab97134cd76ac1522.tar.gz glibc-aa0e46636a5b71b609a41e9ab97134cd76ac1522.tar.bz2 glibc-aa0e46636a5b71b609a41e9ab97134cd76ac1522.zip |
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')
26 files changed, 149 insertions, 146 deletions
diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h index f43ba74305..b283ce9600 100644 --- a/sysdeps/arm/sysdep.h +++ b/sysdeps/arm/sysdep.h @@ -295,8 +295,8 @@ #endif /* Pointer mangling support. */ -#if (IS_IN (rtld) || \ - (!defined SHARED && (IS_IN (libc) || IS_IN (libpthread)))) +#if (IS_IN (rtld) \ + || (!defined SHARED && (IS_IN (libc) || IS_IN (libpthread)))) # ifdef __ASSEMBLER__ # define PTR_MANGLE_LOAD(guard, tmp) \ LDR_HIDDEN (guard, tmp, C_SYMBOL_NAME(__pointer_chk_guard_local), 0) diff --git a/sysdeps/mach/hurd/fork.c b/sysdeps/mach/hurd/fork.c index 4b3419ecfc..5869e67c91 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 diff --git a/sysdeps/mach/hurd/getcwd.c b/sysdeps/mach/hurd/getcwd.c index 1b9381d55e..93b7b1de58 100644 --- a/sysdeps/mach/hurd/getcwd.c +++ b/sysdeps/mach/hurd/getcwd.c @@ -148,8 +148,8 @@ __hurd_canonicalize_directory_name_internal (file_t thisdir, dirdata = dirbuf; dirdatasize = dirbufsize; while (!(err = __dir_readdir (parent, &dirdata, &dirdatasize, - direntry, -1, 0, &nentries)) && - nentries != 0) + direntry, -1, 0, &nentries)) + && nentries != 0) { /* We have a block of directory entries. */ @@ -178,9 +178,9 @@ __hurd_canonicalize_directory_name_internal (file_t thisdir, offset += d->d_reclen; /* Ignore `.' and `..'. */ - if (d->d_name[0] == '.' && - (d->d_namlen == 1 || - (d->d_namlen == 2 && d->d_name[1] == '.'))) + if (d->d_name[0] == '.' + && (d->d_namlen == 1 + || (d->d_namlen == 2 && d->d_name[1] == '.'))) continue; if (mount_point || d->d_ino == thisino) diff --git a/sysdeps/mach/hurd/htl/pt-mutex-consistent.c b/sysdeps/mach/hurd/htl/pt-mutex-consistent.c index edcd9133ba..d6323d56dc 100644 --- a/sysdeps/mach/hurd/htl/pt-mutex-consistent.c +++ b/sysdeps/mach/hurd/htl/pt-mutex-consistent.c @@ -29,11 +29,11 @@ pthread_mutex_consistent (pthread_mutex_t *mtxp) int ret = EINVAL; unsigned int val = mtxp->__lock; - if ((mtxp->__flags & PTHREAD_MUTEX_ROBUST) != 0 && - (val & LLL_DEAD_OWNER) != 0 && - atomic_compare_and_exchange_bool_acq (&mtxp->__lock, - __getpid () | LLL_WAITERS, - val) == 0) + if ((mtxp->__flags & PTHREAD_MUTEX_ROBUST) != 0 + && (val & LLL_DEAD_OWNER) != 0 + && atomic_compare_and_exchange_bool_acq (&mtxp->__lock, + __getpid () | LLL_WAITERS, + val) == 0) { /* The mutex is now ours, and it's consistent. */ mtxp->__owner_id = _pthread_self ()->thread; diff --git a/sysdeps/mach/hurd/htl/pt-mutex-init.c b/sysdeps/mach/hurd/htl/pt-mutex-init.c index f3443819f4..6e036dfaec 100644 --- a/sysdeps/mach/hurd/htl/pt-mutex-init.c +++ b/sysdeps/mach/hurd/htl/pt-mutex-init.c @@ -37,13 +37,13 @@ _pthread_mutex_init (pthread_mutex_t *mtxp, const pthread_mutexattr_t *attrp) if (attrp == NULL) attrp = &dfl_attr; - mtxp->__flags = (attrp->__pshared == PTHREAD_PROCESS_SHARED ? - GSYNC_SHARED : 0) | ((attrp-> - __prioceiling & PTHREAD_MUTEX_ROBUST) ? - PTHREAD_MUTEX_ROBUST : 0); + mtxp->__flags = (attrp->__pshared == PTHREAD_PROCESS_SHARED + ? GSYNC_SHARED : 0) | ((attrp->__prioceiling + & PTHREAD_MUTEX_ROBUST) + ? PTHREAD_MUTEX_ROBUST : 0); - mtxp->__type = attrp->__mutex_type + - (attrp->__mutex_type != __PTHREAD_MUTEX_TIMED); + mtxp->__type = (attrp->__mutex_type + + (attrp->__mutex_type != __PTHREAD_MUTEX_TIMED)); mtxp->__owner_id = 0; mtxp->__shpid = 0; diff --git a/sysdeps/mach/hurd/htl/pt-mutex-transfer-np.c b/sysdeps/mach/hurd/htl/pt-mutex-transfer-np.c index 328bb1c315..7d1054c7b5 100644 --- a/sysdeps/mach/hurd/htl/pt-mutex-transfer-np.c +++ b/sysdeps/mach/hurd/htl/pt-mutex-transfer-np.c @@ -58,8 +58,8 @@ __pthread_mutex_transfer_np (pthread_mutex_t *mtxp, pthread_t th) /* Note that this can be used to transfer an inconsistent * mutex as well. The new owner will still have the same * flags as the original. */ - if (mtxp->__owner_id != self->thread || - (int) (mtxp->__lock & LLL_OWNER_MASK) != __getpid ()) + if (mtxp->__owner_id != self->thread + || (int) (mtxp->__lock & LLL_OWNER_MASK) != __getpid ()) ret = EPERM; else mtxp->__owner_id = pt->thread; diff --git a/sysdeps/mach/hurd/htl/pt-mutex-unlock.c b/sysdeps/mach/hurd/htl/pt-mutex-unlock.c index fbdc31a773..00892b7eb9 100644 --- a/sysdeps/mach/hurd/htl/pt-mutex-unlock.c +++ b/sysdeps/mach/hurd/htl/pt-mutex-unlock.c @@ -65,15 +65,15 @@ __pthread_mutex_unlock (pthread_mutex_t *mtxp) self = _pthread_self (); if (mtxp->__owner_id == NOTRECOVERABLE_ID) ; /* Nothing to do. */ - else if (mtxp->__owner_id != self->thread || - (int) (mtxp->__lock & LLL_OWNER_MASK) != __getpid ()) + else if (mtxp->__owner_id != self->thread + || (int) (mtxp->__lock & LLL_OWNER_MASK) != __getpid ()) ret = EPERM; else if (--mtxp->__cnt == 0) { /* Release the lock. If it's in an inconsistent * state, mark it as irrecoverable. */ - mtxp->__owner_id = (mtxp->__lock & LLL_DEAD_OWNER) ? - NOTRECOVERABLE_ID : 0; + mtxp->__owner_id = ((mtxp->__lock & LLL_DEAD_OWNER) + ? NOTRECOVERABLE_ID : 0); __lll_robust_unlock (&mtxp->__lock, flags); } diff --git a/sysdeps/mach/hurd/htl/pt-mutex.h b/sysdeps/mach/hurd/htl/pt-mutex.h index 26b6f8199f..820dc0e5d0 100644 --- a/sysdeps/mach/hurd/htl/pt-mutex.h +++ b/sysdeps/mach/hurd/htl/pt-mutex.h @@ -27,8 +27,8 @@ #define ROBUST_LOCK(self, mtxp, cb, ...) \ if (mtxp->__owner_id == NOTRECOVERABLE_ID) \ return ENOTRECOVERABLE; \ - else if (mtxp->__owner_id == self->thread && \ - __getpid () == (int)(mtxp->__lock & LLL_OWNER_MASK)) \ + else if (mtxp->__owner_id == self->thread \ + && __getpid () == (int)(mtxp->__lock & LLL_OWNER_MASK)) \ { \ if (mtxp->__type == PT_MTX_RECURSIVE) \ { \ @@ -63,9 +63,9 @@ /* Check that a thread owns the mutex. For non-robust, task-shared * objects, we have to check the thread *and* process-id. */ #define mtx_owned_p(mtx, pt, flags) \ - ((mtx)->__owner_id == (pt)->thread && \ - (((flags) & GSYNC_SHARED) == 0 || \ - (mtx)->__shpid == __getpid ())) + ((mtx)->__owner_id == (pt)->thread \ + && (((flags) & GSYNC_SHARED) == 0 \ + || (mtx)->__shpid == __getpid ())) /* Record a thread as the owner of the mutex. */ #define mtx_set_owner(mtx, pt, flags) \ diff --git a/sysdeps/mach/hurd/htl/pt-mutexattr-getrobust.c b/sysdeps/mach/hurd/htl/pt-mutexattr-getrobust.c index ee5986f213..590d9b5118 100644 --- a/sysdeps/mach/hurd/htl/pt-mutexattr-getrobust.c +++ b/sysdeps/mach/hurd/htl/pt-mutexattr-getrobust.c @@ -26,8 +26,8 @@ int pthread_mutexattr_getrobust (const pthread_mutexattr_t *attrp, int *outp) { - *outp = (attrp->__prioceiling & PTHREAD_MUTEX_ROBUST) ? - PTHREAD_MUTEX_ROBUST : PTHREAD_MUTEX_STALLED; + *outp = ((attrp->__prioceiling & PTHREAD_MUTEX_ROBUST) + ? PTHREAD_MUTEX_ROBUST : PTHREAD_MUTEX_STALLED); return 0; } diff --git a/sysdeps/mach/hurd/i386/init-first.c b/sysdeps/mach/hurd/i386/init-first.c index d372447368..6e8ec6b3ef 100644 --- a/sysdeps/mach/hurd/i386/init-first.c +++ b/sysdeps/mach/hurd/i386/init-first.c @@ -126,8 +126,8 @@ init1 (int argc, char *arg0, ...) char dummy; const vm_address_t newsp = (vm_address_t) &dummy; - if (d->stack_size != 0 && (newsp < d->stack_base || - newsp - d->stack_base > d->stack_size)) + if (d->stack_size != 0 && (newsp < d->stack_base + || newsp - d->stack_base > d->stack_size)) /* The new stack pointer does not intersect with the stack the exec server set up for us, so free that stack. */ __vm_deallocate (__mach_task_self (), d->stack_base, d->stack_size); diff --git a/sysdeps/mach/hurd/i386/trampoline.c b/sysdeps/mach/hurd/i386/trampoline.c index 918edb0ee7..90904cfa28 100644 --- a/sysdeps/mach/hurd/i386/trampoline.c +++ b/sysdeps/mach/hurd/i386/trampoline.c @@ -74,8 +74,8 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, interrupted RPC frame. */ state->basic.esp = state->basic.uesp; - if ((ss->actions[signo].sa_flags & SA_ONSTACK) && - !(ss->sigaltstack.ss_flags & (SS_DISABLE|SS_ONSTACK))) + if ((ss->actions[signo].sa_flags & SA_ONSTACK) + && !(ss->sigaltstack.ss_flags & (SS_DISABLE|SS_ONSTACK))) { sigsp = ss->sigaltstack.ss_sp + ss->sigaltstack.ss_size; ss->sigaltstack.ss_flags |= SS_ONSTACK; @@ -91,8 +91,8 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, We must check for the window during which %esp points at the mach_msg arguments. The space below until %ecx is used by the _hurd_intr_rpc_mach_msg frame, and must not be clobbered. */ - else if (state->basic.eip >= (int) &_hurd_intr_rpc_msg_cx_sp && - state->basic.eip < (int) &_hurd_intr_rpc_msg_sp_restored) + else if (state->basic.eip >= (int) &_hurd_intr_rpc_msg_cx_sp + && state->basic.eip < (int) &_hurd_intr_rpc_msg_sp_restored) /* The SP now points at the mach_msg args, but there is more stack space used below it. The real SP is saved in %ecx; we must push the new frame below there, and restore that value as the SP on diff --git a/sysdeps/mach/hurd/ioctl.c b/sysdeps/mach/hurd/ioctl.c index abd13f6bf7..97448ead3d 100644 --- a/sysdeps/mach/hurd/ioctl.c +++ b/sysdeps/mach/hurd/ioctl.c @@ -66,15 +66,15 @@ __ioctl (int fd, unsigned long int request, ...) kern_return_t RetCode; } header_typecheck; }; - char data[3 * sizeof (mach_msg_type_t) + - msg_align (_IOT_COUNT0 (type) * typesize (_IOT_TYPE0 (type))) + - msg_align (_IOT_COUNT1 (type) * typesize (_IOT_TYPE1 (type))) + - _IOT_COUNT2 (type) * typesize (_IOT_TYPE2 (type))]; + char data[3 * sizeof (mach_msg_type_t) + + msg_align (_IOT_COUNT0 (type) * typesize (_IOT_TYPE0 (type))) + + msg_align (_IOT_COUNT1 (type) * typesize (_IOT_TYPE1 (type))) + + _IOT_COUNT2 (type) * typesize (_IOT_TYPE2 (type))]; #else /* Untyped Mach IPC format. */ mig_reply_error_t header; - char data[_IOT_COUNT0 (type) * typesize (_IOT_TYPE0 (type)) + - _IOT_COUNT1 (type) * typesize (_IOT_TYPE1 (type)) + - _IOT_COUNT2 (type) * typesize (_IOT_TYPE2 (type))]; + char data[_IOT_COUNT0 (type) * typesize (_IOT_TYPE0 (type)) + + _IOT_COUNT1 (type) * typesize (_IOT_TYPE1 (type)) + + _IOT_COUNT2 (type) * typesize (_IOT_TYPE2 (type))]; mach_msg_trailer_t trailer; #endif } msg; @@ -192,11 +192,11 @@ __ioctl (int fd, unsigned long int request, ...) } if (m->msgh_id != msgid + 100) - return (m->msgh_id == MACH_NOTIFY_SEND_ONCE ? - MIG_SERVER_DIED : MIG_REPLY_MISMATCH); + return (m->msgh_id == MACH_NOTIFY_SEND_ONCE + ? MIG_SERVER_DIED : MIG_REPLY_MISMATCH); - if (m->msgh_size != reply_size && - m->msgh_size != sizeof msg.header) + if (m->msgh_size != reply_size + && m->msgh_size != sizeof msg.header) return MIG_TYPE_ERROR; #ifdef MACH_MSG_TYPE_BIT @@ -307,11 +307,11 @@ __ioctl (int fd, unsigned long int request, ...) } case 0: - if (m->msgh_size != reply_size || - ((_IOC_INOUT (request) & IOC_OUT) && - (out (_IOT_COUNT0 (type), _IOT_TYPE0 (type), arg, &arg) || - out (_IOT_COUNT1 (type), _IOT_TYPE1 (type), arg, &arg) || - out (_IOT_COUNT2 (type), _IOT_TYPE2 (type), arg, &arg)))) + if (m->msgh_size != reply_size + || ((_IOC_INOUT (request) & IOC_OUT) + && (out (_IOT_COUNT0 (type), _IOT_TYPE0 (type), arg, &arg) + || out (_IOT_COUNT1 (type), _IOT_TYPE1 (type), arg, &arg) + || out (_IOT_COUNT2 (type), _IOT_TYPE2 (type), arg, &arg)))) return __hurd_fail (MIG_TYPE_ERROR); return 0; diff --git a/sysdeps/mach/hurd/jmp-unwind.c b/sysdeps/mach/hurd/jmp-unwind.c index 0e4705dd48..d40294d0d4 100644 --- a/sysdeps/mach/hurd/jmp-unwind.c +++ b/sysdeps/mach/hurd/jmp-unwind.c @@ -54,8 +54,8 @@ _longjmp_unwind (jmp_buf env, int val) __spin_lock (&ss->critical_section_lock); /* Remove local signal preemptors being unwound past. */ - while (ss->preemptors && - _JMPBUF_UNWINDS (env[0].__jmpbuf, ss->preemptors, demangle_ptr)) + while (ss->preemptors + && _JMPBUF_UNWINDS (env[0].__jmpbuf, ss->preemptors, demangle_ptr)) ss->preemptors = ss->preemptors->next; __spin_unlock (&ss->lock); diff --git a/sysdeps/mach/hurd/kill.c b/sysdeps/mach/hurd/kill.c index 5bbdd5c764..b4b555a334 100644 --- a/sysdeps/mach/hurd/kill.c +++ b/sysdeps/mach/hurd/kill.c @@ -55,8 +55,8 @@ __kill (pid_t pid, int sig) err = __task_terminate (refport); __mach_port_deallocate (__mach_task_self (), refport); } - } while (err == MACH_SEND_INVALID_DEST || - err == MIG_SERVER_DIED); + } while (err == MACH_SEND_INVALID_DEST + || err == MIG_SERVER_DIED); else { error_t taskerr; @@ -103,8 +103,8 @@ __kill (pid_t pid, int sig) } err = HURD_MSGPORT_RPC (__proc_getmsgport (proc, pid, &msgport), (taskerr = __proc_pid2task (proc, pid, - &refport)) ? - __proc_getsidport (proc, &refport) : 0, 1, + &refport)) + ? __proc_getsidport (proc, &refport) : 0, 1, kill_port (msgport, refport)); } if (! err) diff --git a/sysdeps/mach/hurd/mig-reply.c b/sysdeps/mach/hurd/mig-reply.c index 1b81c0ee9e..2dfb509168 100644 --- a/sysdeps/mach/hurd/mig-reply.c +++ b/sysdeps/mach/hurd/mig-reply.c @@ -27,9 +27,9 @@ mach_port_t __hurd_reply_port0; mach_port_t __mig_get_reply_port (void) { - if (__hurd_local_reply_port == MACH_PORT_NULL || - (&__hurd_local_reply_port != &__hurd_reply_port0 - && __hurd_local_reply_port == __hurd_reply_port0)) + if (__hurd_local_reply_port == MACH_PORT_NULL + || (&__hurd_local_reply_port != &__hurd_reply_port0 + && __hurd_local_reply_port == __hurd_reply_port0)) __hurd_local_reply_port = __mach_reply_port (); return __hurd_local_reply_port; diff --git a/sysdeps/mach/hurd/ptrace.c b/sysdeps/mach/hurd/ptrace.c index a47f7b508b..1e7e6da552 100644 --- a/sysdeps/mach/hurd/ptrace.c +++ b/sysdeps/mach/hurd/ptrace.c @@ -349,8 +349,8 @@ ptrace (enum __ptrace_request request, ... ) task_t task = __pid2task (pid); if (task == MACH_PORT_NULL) return -1; - if ((vm_address_t) addr % __vm_page_size == 0 && - (vm_address_t) data % __vm_page_size == 0) + if ((vm_address_t) addr % __vm_page_size == 0 + && (vm_address_t) data % __vm_page_size == 0) { /* Writing whole pages; can go directly from the user's buffer. */ ourpage = (vm_address_t) addr2; diff --git a/sysdeps/sparc/sparc64/dl-machine.h b/sysdeps/sparc/sparc64/dl-machine.h index 14930890e3..4a9f6f59d5 100644 --- a/sysdeps/sparc/sparc64/dl-machine.h +++ b/sysdeps/sparc/sparc64/dl-machine.h @@ -547,66 +547,66 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc, break; case R_SPARC_WDISP30: *(unsigned int *) reloc_addr = - ((*(unsigned int *)reloc_addr & 0xc0000000) | - (((value - (Elf64_Addr) reloc_addr) >> 2) & 0x3fffffff)); + ((*(unsigned int *)reloc_addr & 0xc0000000) + | (((value - (Elf64_Addr) reloc_addr) >> 2) & 0x3fffffff)); break; /* MEDLOW code model relocs */ case R_SPARC_LO10: *(unsigned int *) reloc_addr = - ((*(unsigned int *)reloc_addr & ~0x3ff) | - (value & 0x3ff)); + ((*(unsigned int *)reloc_addr & ~0x3ff) + | (value & 0x3ff)); break; case R_SPARC_HI22: *(unsigned int *) reloc_addr = - ((*(unsigned int *)reloc_addr & 0xffc00000) | - ((value >> 10) & 0x3fffff)); + ((*(unsigned int *)reloc_addr & 0xffc00000) + | ((value >> 10) & 0x3fffff)); break; case R_SPARC_OLO10: *(unsigned int *) reloc_addr = - ((*(unsigned int *)reloc_addr & ~0x1fff) | - (((value & 0x3ff) + ELF64_R_TYPE_DATA (reloc->r_info)) & 0x1fff)); + ((*(unsigned int *)reloc_addr & ~0x1fff) + | (((value & 0x3ff) + ELF64_R_TYPE_DATA (reloc->r_info)) & 0x1fff)); break; /* ABS34 code model reloc */ case R_SPARC_H34: *(unsigned int *) reloc_addr = - ((*(unsigned int *)reloc_addr & 0xffc00000) | - ((value >> 12) & 0x3fffff)); + ((*(unsigned int *)reloc_addr & 0xffc00000) + | ((value >> 12) & 0x3fffff)); break; /* MEDMID code model relocs */ case R_SPARC_H44: *(unsigned int *) reloc_addr = - ((*(unsigned int *)reloc_addr & 0xffc00000) | - ((value >> 22) & 0x3fffff)); + ((*(unsigned int *)reloc_addr & 0xffc00000) + | ((value >> 22) & 0x3fffff)); break; case R_SPARC_M44: *(unsigned int *) reloc_addr = - ((*(unsigned int *)reloc_addr & ~0x3ff) | - ((value >> 12) & 0x3ff)); + ((*(unsigned int *)reloc_addr & ~0x3ff) + | ((value >> 12) & 0x3ff)); break; case R_SPARC_L44: *(unsigned int *) reloc_addr = - ((*(unsigned int *)reloc_addr & ~0xfff) | - (value & 0xfff)); + ((*(unsigned int *)reloc_addr & ~0xfff) + | (value & 0xfff)); break; /* MEDANY code model relocs */ case R_SPARC_HH22: *(unsigned int *) reloc_addr = - ((*(unsigned int *)reloc_addr & 0xffc00000) | - (value >> 42)); + ((*(unsigned int *)reloc_addr & 0xffc00000) + | (value >> 42)); break; case R_SPARC_HM10: *(unsigned int *) reloc_addr = - ((*(unsigned int *)reloc_addr & ~0x3ff) | - ((value >> 32) & 0x3ff)); + ((*(unsigned int *)reloc_addr & ~0x3ff) + | ((value >> 32) & 0x3ff)); break; case R_SPARC_LM22: *(unsigned int *) reloc_addr = - ((*(unsigned int *)reloc_addr & 0xffc00000) | - ((value >> 10) & 0x003fffff)); + ((*(unsigned int *)reloc_addr & 0xffc00000) + | ((value >> 10) & 0x003fffff)); break; case R_SPARC_UA16: ((unsigned char *) reloc_addr_arg) [0] = value >> 8; diff --git a/sysdeps/unix/sysv/linux/aarch64/sysdep.h b/sysdeps/unix/sysv/linux/aarch64/sysdep.h index 10646d62f9..935c507f8c 100644 --- a/sysdeps/unix/sysv/linux/aarch64/sysdep.h +++ b/sysdeps/unix/sysv/linux/aarch64/sysdep.h @@ -255,9 +255,9 @@ #endif /* __ASSEMBLER__ */ /* Pointer mangling is supported for AArch64. */ -#if (IS_IN (rtld) || \ - (!defined SHARED && (IS_IN (libc) \ - || IS_IN (libpthread)))) +#if (IS_IN (rtld) \ + || (!defined SHARED && (IS_IN (libc) \ + || IS_IN (libpthread)))) # ifdef __ASSEMBLER__ /* Note, dst, src, guard, and tmp are all register numbers rather than register names so they will work with both ILP32 and LP64. */ diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index ab29cc9c2e..861404e15d 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -506,14 +506,15 @@ process_cpuinfo(struct cpuinfo_data *data) { if (fgets_unlocked (dummy, 256, fp) == NULL) break; - if (!got_type && - sscanf (dummy, "system type : %256[^\n]\n", data->systype) == 1) + if (!got_type + && sscanf (dummy, "system type : %256[^\n]\n", data->systype) == 1) got_type = 1; - if (!got_vari && - sscanf (dummy, "system variation : %256[^\n]\n", data->sysvari) == 1) + if (!got_vari + && (sscanf (dummy, "system variation : %256[^\n]\n", data->sysvari) + == 1)) got_vari = 1; - if (!got_model && - sscanf (dummy, "cpu model : %256[^\n]\n", data->cpumodel) == 1) + if (!got_model + && sscanf (dummy, "cpu model : %256[^\n]\n", data->cpumodel) == 1) got_model = 1; } diff --git a/sysdeps/unix/sysv/linux/bits/timex.h b/sysdeps/unix/sysv/linux/bits/timex.h index 6b466417ff..bb272e8b19 100644 --- a/sysdeps/unix/sysv/linux/bits/timex.h +++ b/sysdeps/unix/sysv/linux/bits/timex.h @@ -104,7 +104,7 @@ struct timex #define STA_CLK 0x8000 /* clock source (0 = A, 1 = B) (ro) */ /* Read-only bits */ -#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | \ - STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK) +#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER \ + | STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK) #endif /* bits/timex.h */ diff --git a/sysdeps/unix/sysv/linux/csky/sysdep.h b/sysdeps/unix/sysv/linux/csky/sysdep.h index 5e37c9a4e4..4faaf859e4 100644 --- a/sysdeps/unix/sysv/linux/csky/sysdep.h +++ b/sysdeps/unix/sysv/linux/csky/sysdep.h @@ -486,8 +486,8 @@ __local_syscall_error: \ #endif /* __ASSEMBLER__ */ /* Pointer mangling support. */ -#if (IS_IN (rtld) || \ - (!defined SHARED && (IS_IN (libc) || IS_IN (libpthread)))) +#if (IS_IN (rtld) \ + || (!defined SHARED && (IS_IN (libc) || IS_IN (libpthread)))) # ifdef __ASSEMBLER__ # define PTR_MANGLE(dst, src, guard) \ grs t0, 1f; \ diff --git a/sysdeps/unix/sysv/linux/generic/____longjmp_chk.c b/sysdeps/unix/sysv/linux/generic/____longjmp_chk.c index c918616f3e..8c283775e1 100644 --- a/sysdeps/unix/sysv/linux/generic/____longjmp_chk.c +++ b/sysdeps/unix/sysv/linux/generic/____longjmp_chk.c @@ -49,8 +49,8 @@ void ____longjmp_chk (__jmp_buf env, int val) /* If we we are executing on the alternate stack and within the bounds, do the longjmp. */ - if (ss.ss_flags == SS_ONSTACK && - (this_frame >= ss.ss_sp && this_frame < (ss.ss_sp + ss.ss_size))) + if (ss.ss_flags == SS_ONSTACK + && (this_frame >= ss.ss_sp && this_frame < (ss.ss_sp + ss.ss_size))) __longjmp (env, val); __fortify_fail ("longjmp causes uninitialized stack frame"); diff --git a/sysdeps/unix/sysv/linux/generic/futimesat.c b/sysdeps/unix/sysv/linux/generic/futimesat.c index f809cf63c9..93abc34c22 100644 --- a/sysdeps/unix/sysv/linux/generic/futimesat.c +++ b/sysdeps/unix/sysv/linux/generic/futimesat.c @@ -37,8 +37,8 @@ futimesat (int fd, const char *file, const struct timeval tvp[2]) if (tvp) { - if (tvp[0].tv_usec >= 1000000 || tvp[0].tv_usec < 0 || - tvp[1].tv_usec >= 1000000 || tvp[1].tv_usec < 0) + if (tvp[0].tv_usec >= 1000000 || tvp[0].tv_usec < 0 + || tvp[1].tv_usec >= 1000000 || tvp[1].tv_usec < 0) { __set_errno (EINVAL); return -1; diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h index 1481094cec..640fb52de1 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h +++ b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h @@ -233,9 +233,9 @@ #undef INTERNAL_SYSCALL #define INTERNAL_SYSCALL(name, err, nr, args...) \ - (((__NR_##name) < 256) ? \ - INTERNAL_SYSCALL_DIRECT(name, err, nr, args) : \ - INTERNAL_SYSCALL_SVC0(name, err,nr, args)) + (((__NR_##name) < 256) \ + ? INTERNAL_SYSCALL_DIRECT(name, err, nr, args) \ + : INTERNAL_SYSCALL_SVC0(name, err,nr, args)) #undef INTERNAL_SYSCALL_ERROR_P #define INTERNAL_SYSCALL_ERROR_P(val, err) \ diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h index d230192d11..9a9834c750 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h +++ b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h @@ -239,9 +239,9 @@ #undef INTERNAL_SYSCALL #define INTERNAL_SYSCALL(name, err, nr, args...) \ - (((__NR_##name) < 256) ? \ - INTERNAL_SYSCALL_DIRECT(name, err, nr, args) : \ - INTERNAL_SYSCALL_SVC0(name, err,nr, args)) + (((__NR_##name) < 256) \ + ? INTERNAL_SYSCALL_DIRECT(name, err, nr, args) \ + : INTERNAL_SYSCALL_SVC0(name, err,nr, args)) #undef INTERNAL_SYSCALL_ERROR_P #define INTERNAL_SYSCALL_ERROR_P(val, err) \ diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c b/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c index 87853d6b6e..8c308f5983 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c @@ -58,8 +58,8 @@ __get_clockfreq_via_cpuinfo (void) while (mhz < endp && *mhz != '\n') { - if ((*mhz >= '0' && *mhz <= '9') || - (*mhz >= 'a' && *mhz <= 'f')) + if ((*mhz >= '0' && *mhz <= '9') + || (*mhz >= 'a' && *mhz <= 'f')) { result <<= 4; if (*mhz >= '0' && *mhz <= '9') |