]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Break some lines before not after operators.
authorJoseph Myers <joseph@codesourcery.com>
Fri, 22 Feb 2019 01:32:36 +0000 (01:32 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Fri, 22 Feb 2019 01:32:36 +0000 (01:32 +0000)
The GNU Coding Standards specify that line breaks in expressions
should go before an operator, not after one.  This patch fixes various
code to do this.  It only changes code that appears to be mostly
following GNU style anyway, not files and directories with
substantially different formatting.  It is not exhaustive even for
files using GNU style (for example, changes to sysdeps files are
deferred for subsequent cleanups).  Some files changed are shared with
gnulib, but most are specific to glibc.  Changes were made manually,
with places to change found by grep (so some cases, e.g. where the
operator was followed by a comment at end of line, are particularly
liable to have been missed by grep, but I did include cases where the
operator was followed by backslash-newline).

This patch generally does not attempt to address other coding style
issues in the expressions changed (for example, missing spaces before
'(', or lack of parentheses to ensure indentation of continuation
lines properly reflects operator precedence).

Tested for x86_64, and with build-many-glibcs.py.

* benchtests/bench-memmem.c (simple_memmem): Break lines before
rather than after operators.
* benchtests/bench-skeleton.c (TIMESPEC_AFTER): Likewise.
* crypt/md5.c (md5_finish_ctx): Likewise.
* crypt/sha256.c (__sha256_finish_ctx): Likewise.
* crypt/sha512.c (__sha512_finish_ctx): Likewise.
* elf/cache.c (load_aux_cache): Likewise.
* elf/dl-load.c (open_verify): Likewise.
* elf/get-dynamic-info.h (elf_get_dynamic_info): Likewise.
* elf/readelflib.c (process_elf_file): Likewise.
* elf/rtld.c (dl_main): Likewise.
* elf/sprof.c (generate_call_graph): Likewise.
* hurd/ctty-input.c (_hurd_ctty_input): Likewise.
* hurd/ctty-output.c (_hurd_ctty_output): Likewise.
* hurd/dtable.c (reauth_dtable): Likewise.
* hurd/getdport.c (__getdport): Likewise.
* hurd/hurd/signal.h (_hurd_interrupted_rpc_timeout): Likewise.
* hurd/hurd/sigpreempt.h (HURD_PREEMPT_SIGNAL_P): Likewise.
* hurd/hurdfault.c (_hurdsig_fault_catch_exception_raise):
Likewise.
* hurd/hurdioctl.c (fioctl): Likewise.
* hurd/hurdselect.c (_hurd_select): Likewise.
* hurd/hurdsig.c (_hurdsig_abort_rpcs): Likewise.
(STOPSIGS): Likewise.
* hurd/hurdstartup.c (_hurd_startup): Likewise.
* hurd/intr-msg.c (_hurd_intr_rpc_mach_msg): Likewise.
* hurd/lookup-retry.c (__hurd_file_name_lookup_retry): Likewise.
* hurd/msgportdemux.c (msgport_server): Likewise.
* hurd/setauth.c (_hurd_setauth): Likewise.
* include/features.h (__GLIBC_USE_DEPRECATED_SCANF): Likewise.
* libio/libioP.h [IO_DEBUG] (CHECK_FILE): Likewise.
* locale/programs/ld-ctype.c (set_class_defaults): Likewise.
* localedata/tests-mbwc/tst_swscanf.c (tst_swscanf): Likewise.
* login/tst-utmp.c (do_check): Likewise.
(simulate_login): Likewise.
* mach/lowlevellock.h (lll_lock): Likewise.
(lll_trylock): Likewise.
* math/test-fenv.c (ALL_EXC): Likewise.
* math/test-fenvinline.c (ALL_EXC): Likewise.
* misc/sys/cdefs.h (__attribute_deprecated_msg__): Likewise.
* nis/nis_call.c (__do_niscall3): Likewise.
* nis/nis_callback.c (cb_prog_1): Likewise.
* nis/nis_defaults.c (searchaccess): Likewise.
* nis/nis_findserv.c (__nis_findfastest_with_timeout): Likewise.
* nis/nis_ismember.c (internal_ismember): Likewise.
* nis/nis_local_names.c (nis_local_principal): Likewise.
* nis/nss_nis/nis-rpc.c (_nss_nis_getrpcbyname_r): Likewise.
* nis/nss_nisplus/nisplus-netgrp.c (_nss_nisplus_getnetgrent_r):
Likewise.
* nis/ypclnt.c (yp_match): Likewise.
(yp_first): Likewise.
(yp_next): Likewise.
(yp_master): Likewise.
(yp_order): Likewise.
* nscd/hstcache.c (cache_addhst): Likewise.
* nscd/initgrcache.c (addinitgroupsX): Likewise.
* nss/nss_compat/compat-pwd.c (copy_pwd_changes): Likewise.
(internal_getpwuid_r): Likewise.
* nss/nss_compat/compat-spwd.c (copy_spwd_changes): Likewise.
* posix/glob.h (__GLOB_FLAGS): Likewise.
* posix/regcomp.c (peek_token): Likewise.
(peek_token_bracket): Likewise.
(parse_expression): Likewise.
* posix/regexec.c (sift_states_iter_mb): Likewise.
(check_node_accept_bytes): Likewise.
* posix/tst-spawn3.c (do_test): Likewise.
* posix/wordexp-test.c (testit): Likewise.
* posix/wordexp.c (parse_tilde): Likewise.
(exec_comm): Likewise.
* posix/wordexp.h (__WRDE_FLAGS): Likewise.
* resource/vtimes.c (TIMEVAL_TO_VTIMES): Likewise.
* setjmp/sigjmp.c (__sigjmp_save): Likewise.
* stdio-common/printf_fp.c (__printf_fp_l): Likewise.
* stdio-common/tst-fileno.c (do_test): Likewise.
* stdio-common/vfprintf-internal.c (vfprintf): Likewise.
* stdlib/strfmon_l.c (__vstrfmon_l_internal): Likewise.
* stdlib/strtod_l.c (round_and_return): Likewise.
(____STRTOF_INTERNAL): Likewise.
* stdlib/tst-strfrom.h (TEST_STRFROM): Likewise.
* string/strcspn.c (STRCSPN): Likewise.
* string/test-memmem.c (simple_memmem): Likewise.
* termios/tcsetattr.c (tcsetattr): Likewise.
* time/alt_digit.c (_nl_parse_alt_digit): Likewise.
* time/asctime.c (asctime_internal): Likewise.
* time/strptime_l.c (__strptime_internal): Likewise.
* time/sys/time.h (timercmp): Likewise.
* time/tzfile.c (__tzfile_compute): Likewise.

72 files changed:
ChangeLog
benchtests/bench-memmem.c
benchtests/bench-skeleton.c
crypt/md5.c
crypt/sha256.c
crypt/sha512.c
elf/cache.c
elf/dl-load.c
elf/get-dynamic-info.h
elf/readelflib.c
elf/rtld.c
elf/sprof.c
hurd/ctty-input.c
hurd/ctty-output.c
hurd/dtable.c
hurd/getdport.c
hurd/hurd/signal.h
hurd/hurd/sigpreempt.h
hurd/hurdfault.c
hurd/hurdioctl.c
hurd/hurdselect.c
hurd/hurdsig.c
hurd/hurdstartup.c
hurd/intr-msg.c
hurd/lookup-retry.c
hurd/msgportdemux.c
hurd/setauth.c
include/features.h
libio/libioP.h
locale/programs/ld-ctype.c
localedata/tests-mbwc/tst_swscanf.c
login/tst-utmp.c
mach/lowlevellock.h
math/test-fenv.c
math/test-fenvinline.c
misc/sys/cdefs.h
nis/nis_call.c
nis/nis_callback.c
nis/nis_defaults.c
nis/nis_findserv.c
nis/nis_ismember.c
nis/nis_local_names.c
nis/nss_nis/nis-rpc.c
nis/nss_nisplus/nisplus-netgrp.c
nis/ypclnt.c
nscd/hstcache.c
nscd/initgrcache.c
nss/nss_compat/compat-pwd.c
nss/nss_compat/compat-spwd.c
posix/glob.h
posix/regcomp.c
posix/regexec.c
posix/tst-spawn3.c
posix/wordexp-test.c
posix/wordexp.c
posix/wordexp.h
resource/vtimes.c
setjmp/sigjmp.c
stdio-common/printf_fp.c
stdio-common/tst-fileno.c
stdio-common/vfprintf-internal.c
stdlib/strfmon_l.c
stdlib/strtod_l.c
stdlib/tst-strfrom.h
string/strcspn.c
string/test-memmem.c
termios/tcsetattr.c
time/alt_digit.c
time/asctime.c
time/strptime_l.c
time/sys/time.h
time/tzfile.c

index 14072123ef0c046d983c2554dbbc056b4578f272..aaf966c1e76311a7d9dc3d2edd3ea913881d3242 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,93 @@
+2019-02-22  Joseph Myers  <joseph@codesourcery.com>
+
+       * benchtests/bench-memmem.c (simple_memmem): Break lines before
+       rather than after operators.
+       * benchtests/bench-skeleton.c (TIMESPEC_AFTER): Likewise.
+       * crypt/md5.c (md5_finish_ctx): Likewise.
+       * crypt/sha256.c (__sha256_finish_ctx): Likewise.
+       * crypt/sha512.c (__sha512_finish_ctx): Likewise.
+       * elf/cache.c (load_aux_cache): Likewise.
+       * elf/dl-load.c (open_verify): Likewise.
+       * elf/get-dynamic-info.h (elf_get_dynamic_info): Likewise.
+       * elf/readelflib.c (process_elf_file): Likewise.
+       * elf/rtld.c (dl_main): Likewise.
+       * elf/sprof.c (generate_call_graph): Likewise.
+       * hurd/ctty-input.c (_hurd_ctty_input): Likewise.
+       * hurd/ctty-output.c (_hurd_ctty_output): Likewise.
+       * hurd/dtable.c (reauth_dtable): Likewise.
+       * hurd/getdport.c (__getdport): Likewise.
+       * hurd/hurd/signal.h (_hurd_interrupted_rpc_timeout): Likewise.
+       * hurd/hurd/sigpreempt.h (HURD_PREEMPT_SIGNAL_P): Likewise.
+       * hurd/hurdfault.c (_hurdsig_fault_catch_exception_raise):
+       Likewise.
+       * hurd/hurdioctl.c (fioctl): Likewise.
+       * hurd/hurdselect.c (_hurd_select): Likewise.
+       * hurd/hurdsig.c (_hurdsig_abort_rpcs): Likewise.
+       (STOPSIGS): Likewise.
+       * hurd/hurdstartup.c (_hurd_startup): Likewise.
+       * hurd/intr-msg.c (_hurd_intr_rpc_mach_msg): Likewise.
+       * hurd/lookup-retry.c (__hurd_file_name_lookup_retry): Likewise.
+       * hurd/msgportdemux.c (msgport_server): Likewise.
+       * hurd/setauth.c (_hurd_setauth): Likewise.
+       * include/features.h (__GLIBC_USE_DEPRECATED_SCANF): Likewise.
+       * libio/libioP.h [IO_DEBUG] (CHECK_FILE): Likewise.
+       * locale/programs/ld-ctype.c (set_class_defaults): Likewise.
+       * localedata/tests-mbwc/tst_swscanf.c (tst_swscanf): Likewise.
+       * login/tst-utmp.c (do_check): Likewise.
+       (simulate_login): Likewise.
+       * mach/lowlevellock.h (lll_lock): Likewise.
+       (lll_trylock): Likewise.
+       * math/test-fenv.c (ALL_EXC): Likewise.
+       * math/test-fenvinline.c (ALL_EXC): Likewise.
+       * misc/sys/cdefs.h (__attribute_deprecated_msg__): Likewise.
+       * nis/nis_call.c (__do_niscall3): Likewise.
+       * nis/nis_callback.c (cb_prog_1): Likewise.
+       * nis/nis_defaults.c (searchaccess): Likewise.
+       * nis/nis_findserv.c (__nis_findfastest_with_timeout): Likewise.
+       * nis/nis_ismember.c (internal_ismember): Likewise.
+       * nis/nis_local_names.c (nis_local_principal): Likewise.
+       * nis/nss_nis/nis-rpc.c (_nss_nis_getrpcbyname_r): Likewise.
+       * nis/nss_nisplus/nisplus-netgrp.c (_nss_nisplus_getnetgrent_r):
+       Likewise.
+       * nis/ypclnt.c (yp_match): Likewise.
+       (yp_first): Likewise.
+       (yp_next): Likewise.
+       (yp_master): Likewise.
+       (yp_order): Likewise.
+       * nscd/hstcache.c (cache_addhst): Likewise.
+       * nscd/initgrcache.c (addinitgroupsX): Likewise.
+       * nss/nss_compat/compat-pwd.c (copy_pwd_changes): Likewise.
+       (internal_getpwuid_r): Likewise.
+       * nss/nss_compat/compat-spwd.c (copy_spwd_changes): Likewise.
+       * posix/glob.h (__GLOB_FLAGS): Likewise.
+       * posix/regcomp.c (peek_token): Likewise.
+       (peek_token_bracket): Likewise.
+       (parse_expression): Likewise.
+       * posix/regexec.c (sift_states_iter_mb): Likewise.
+       (check_node_accept_bytes): Likewise.
+       * posix/tst-spawn3.c (do_test): Likewise.
+       * posix/wordexp-test.c (testit): Likewise.
+       * posix/wordexp.c (parse_tilde): Likewise.
+       (exec_comm): Likewise.
+       * posix/wordexp.h (__WRDE_FLAGS): Likewise.
+       * resource/vtimes.c (TIMEVAL_TO_VTIMES): Likewise.
+       * setjmp/sigjmp.c (__sigjmp_save): Likewise.
+       * stdio-common/printf_fp.c (__printf_fp_l): Likewise.
+       * stdio-common/tst-fileno.c (do_test): Likewise.
+       * stdio-common/vfprintf-internal.c (vfprintf): Likewise.
+       * stdlib/strfmon_l.c (__vstrfmon_l_internal): Likewise.
+       * stdlib/strtod_l.c (round_and_return): Likewise.
+       (____STRTOF_INTERNAL): Likewise.
+       * stdlib/tst-strfrom.h (TEST_STRFROM): Likewise.
+       * string/strcspn.c (STRCSPN): Likewise.
+       * string/test-memmem.c (simple_memmem): Likewise.
+       * termios/tcsetattr.c (tcsetattr): Likewise.
+       * time/alt_digit.c (_nl_parse_alt_digit): Likewise.
+       * time/asctime.c (asctime_internal): Likewise.
+       * time/strptime_l.c (__strptime_internal): Likewise.
+       * time/sys/time.h (timercmp): Likewise.
+       * time/tzfile.c (__tzfile_compute): Likewise.
+
 2019-02-21  Patsy Griffin Franklin  <pfrankli@redhat.com>
 
         [BZ #21915]
index 844031717bcc8eda3d17c8fdfa8bcf497051b421..4936b236a33b5e22ca6c25b4729be5fee2cd6a04 100644 (file)
@@ -47,10 +47,10 @@ simple_memmem (const void *haystack, size_t haystack_len, const void *needle,
     return NULL;
 
   for (begin = (const char *) haystack; begin <= last_possible; ++begin)
-    if (begin[0] == ((const char *) needle)[0] &&
-       !memcmp ((const void *) &begin[1],
-                (const void *) ((const char *) needle + 1),
-                needle_len - 1))
+    if (begin[0] == ((const char *) needle)[0]
+       && !memcmp ((const void *) &begin[1],
+                   (const void *) ((const char *) needle + 1),
+                   needle_len - 1))
       return (void *) begin;
 
   return NULL;
index dd8b74df8b052093f04669dc8cd7f918d2d64d82..37625c4296882268f6260d99adbc7f0295164ffc 100644 (file)
@@ -29,9 +29,9 @@
 #include "bench-util.c"
 
 #define TIMESPEC_AFTER(a, b) \
-  (((a).tv_sec == (b).tv_sec) ?                                                      \
-     ((a).tv_nsec > (b).tv_nsec) :                                           \
-       ((a).tv_sec > (b).tv_sec))
+  (((a).tv_sec == (b).tv_sec)                                                \
+   ? ((a).tv_nsec > (b).tv_nsec)                                             \
+   : ((a).tv_sec > (b).tv_sec))
 int
 main (int argc, char **argv)
 {
index 587bb7e1f89561dc14c2e943b75cb722ff5948e3..ef13ca948eb9a4dc8499196ff4a05f54ecabe377 100644 (file)
@@ -116,8 +116,8 @@ md5_finish_ctx (struct md5_ctx *ctx, void *resbuf)
 
   /* Put the 64-bit file length in *bits* at the end of the buffer.  */
   ctx->buffer32[(bytes + pad) / 4] = SWAP (ctx->total[0] << 3);
-  ctx->buffer32[(bytes + pad + 4) / 4] = SWAP ((ctx->total[1] << 3) |
-                                              (ctx->total[0] >> 29));
+  ctx->buffer32[(bytes + pad + 4) / 4] = SWAP ((ctx->total[1] << 3)
+                                              (ctx->total[0] >> 29));
 
   /* Process last bytes.  */
   __md5_process_block (ctx->buffer, bytes + pad + 8, ctx);
index 46fbf982e687091d797f1d3c0107a116628fb4f5..f90650f083e9f0c973d978ada2b4f1e083b898cd 100644 (file)
@@ -125,8 +125,8 @@ __sha256_finish_ctx (struct sha256_ctx *ctx, void *resbuf)
   ctx->buffer64[(bytes + pad) / 8] = SWAP64 (ctx->total64 << 3);
 #else
   ctx->buffer32[(bytes + pad + 4) / 4] = SWAP (ctx->total[TOTAL64_low] << 3);
-  ctx->buffer32[(bytes + pad) / 4] = SWAP ((ctx->total[TOTAL64_high] << 3) |
-                                          (ctx->total[TOTAL64_low] >> 29));
+  ctx->buffer32[(bytes + pad) / 4] = SWAP ((ctx->total[TOTAL64_high] << 3)
+                                          (ctx->total[TOTAL64_low] >> 29));
 #endif
 
   /* Process last bytes.  */
index e0c4ac1c1f68f9daccb2ea1290fda573920fd998..94adbd428ad18026bc884ae382c68f50236cd6f3 100644 (file)
@@ -149,8 +149,8 @@ __sha512_finish_ctx (struct sha512_ctx *ctx, void *resbuf)
 
   /* Put the 128-bit file length in *bits* at the end of the buffer.  */
   ctx->buffer64[(bytes + pad + 8) / 8] = SWAP (ctx->total[TOTAL128_low] << 3);
-  ctx->buffer64[(bytes + pad) / 8] = SWAP ((ctx->total[TOTAL128_high] << 3) |
-                                          (ctx->total[TOTAL128_low] >> 61));
+  ctx->buffer64[(bytes + pad) / 8] = SWAP ((ctx->total[TOTAL128_high] << 3)
+                                          (ctx->total[TOTAL128_low] >> 61));
 
   /* Process last bytes.  */
   __sha512_process_block (ctx->buffer, bytes + pad + 16, ctx);
index b8e9e6ccc32eb7eeb77a4ff606565c5bf3235b7e..b8934898b6ddb17b6a2667ab5468086a2165391e 100644 (file)
@@ -712,9 +712,9 @@ load_aux_cache (const char *aux_cache_name)
   if (aux_cache == MAP_FAILED
       || aux_cache_size < sizeof (struct aux_cache_file)
       || memcmp (aux_cache->magic, AUX_CACHEMAGIC, sizeof AUX_CACHEMAGIC - 1)
-      || aux_cache_size != (sizeof(struct aux_cache_file) +
-                           aux_cache->nlibs * sizeof(struct aux_cache_file_entry) +
-                           aux_cache->len_strings))
+      || aux_cache_size != (sizeof(struct aux_cache_file)
+                           + aux_cache->nlibs * sizeof(struct aux_cache_file_entry)
+                           aux_cache->len_strings))
     {
       close (fd);
       init_aux_cache ();
index f9725244216bc4396c866e213838c88a1ca14894..0e759cf8ca3f6c6c51045fbb15bff81f0add72ab 100644 (file)
@@ -1581,15 +1581,15 @@ open_verify (const char *name, int fd,
          const Elf32_Word *magp = (const void *) ehdr->e_ident;
          if (*magp !=
 #if BYTE_ORDER == LITTLE_ENDIAN
-             ((ELFMAG0 << (EI_MAG0 * 8)) |
-              (ELFMAG1 << (EI_MAG1 * 8)) |
-              (ELFMAG2 << (EI_MAG2 * 8)) |
-              (ELFMAG3 << (EI_MAG3 * 8)))
+             ((ELFMAG0 << (EI_MAG0 * 8))
+              | (ELFMAG1 << (EI_MAG1 * 8))
+              | (ELFMAG2 << (EI_MAG2 * 8))
+              (ELFMAG3 << (EI_MAG3 * 8)))
 #else
-             ((ELFMAG0 << (EI_MAG3 * 8)) |
-              (ELFMAG1 << (EI_MAG2 * 8)) |
-              (ELFMAG2 << (EI_MAG1 * 8)) |
-              (ELFMAG3 << (EI_MAG0 * 8)))
+             ((ELFMAG0 << (EI_MAG3 * 8))
+              | (ELFMAG1 << (EI_MAG2 * 8))
+              | (ELFMAG2 << (EI_MAG1 * 8))
+              (ELFMAG3 << (EI_MAG0 * 8)))
 #endif
              )
            errstring = N_("invalid ELF header");
index 0e4cc735f3b0d56043bd545deed1c06a9cd5572a..75fbb88f782414856022afc4380586ec247f4489 100644 (file)
@@ -49,8 +49,8 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp)
     {
       if ((d_tag_utype) dyn->d_tag < DT_NUM)
        info[dyn->d_tag] = dyn;
-      else if (dyn->d_tag >= DT_LOPROC &&
-              dyn->d_tag < DT_LOPROC + DT_THISPROCNUM)
+      else if (dyn->d_tag >= DT_LOPROC
+              && dyn->d_tag < DT_LOPROC + DT_THISPROCNUM)
        {
          /* This does not violate the array bounds of l->l_info, but
             gcc 4.6 on sparc somehow does not see this.  */
index 470b09d1aa0cbe092764076422693ec612a09e13..ca4dc6f11e6a919008af16668b83130f4b279e1f 100644 (file)
@@ -164,10 +164,10 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
              if (size == 0)
                break;
 
-             *osversion = (abi_note [4] << 24) |
-                          ((abi_note [5] & 0xff) << 16) |
-                          ((abi_note [6] & 0xff) << 8) |
-                          (abi_note [7] & 0xff);
+             *osversion = ((abi_note [4] << 24)
+                           | ((abi_note [5] & 0xff) << 16)
+                           | ((abi_note [6] & 0xff) << 8)
+                           | (abi_note [7] & 0xff));
            }
          break;
 
index c1cc1b01f2d736585ef30c3ef0f6bb1f95513a63..1b38c6b73278a3baa0540841bcc8c52d87a11daf 100644 (file)
@@ -2110,8 +2110,8 @@ ERROR: '%s': cannot process note segment.\n", _dl_argv[0]);
       liblist = (ElfW(Lib) *)
                main_map->l_info[ADDRIDX (DT_GNU_LIBLIST)]->d_un.d_ptr;
       liblistend = (ElfW(Lib) *)
-                  ((char *) liblist +
-                   main_map->l_info[VALIDX (DT_GNU_LIBLISTSZ)]->d_un.d_val);
+                  ((char *) liblist
+                   main_map->l_info[VALIDX (DT_GNU_LIBLISTSZ)]->d_un.d_val);
       r_list = main_map->l_searchlist.r_list;
       r_listend = r_list + main_map->l_searchlist.r_nlist;
 
index 07829c27de1d72ff3c4f3aaad02537cb2fee4dae..06d5ca2aff6bd1ec51a511b40e656cbc7c9f1fb1 100644 (file)
@@ -1354,8 +1354,8 @@ generate_call_graph (struct profdata *profdata)
                     ? sortsym[runp->idx]->ticks * tick_unit : 0.0),
                    0.0, /* FIXME: what's time for the children, recursive */
                    runp->count, sortsym[cnt]->calls,
-                   (runp->idx != (size_t) -1l ?
-                    sortsym[runp->idx]->name : "<UNKNOWN>"));
+                   (runp->idx != (size_t) -1l
+                    sortsym[runp->idx]->name : "<UNKNOWN>"));
 
            if (runp->idx != (size_t) -1l)
              printf (" [%Zd]", runp->idx);
index df03f8d69f0106885b605ed1b022d37f631bfb34..beff4f6d1190d0f21a450890469eeb148816f076 100644 (file)
@@ -44,8 +44,8 @@ _hurd_ctty_input (io_t port, io_t ctty, error_t (*rpc) (io_t))
            {
              struct hurd_sigstate *ss = _hurd_self_sigstate ();
              __spin_lock (&ss->lock);
-             if (__sigismember (&ss->blocked, SIGTTIN) ||
-                 ss->actions[SIGTTIN].sa_handler == SIG_IGN)
+             if (__sigismember (&ss->blocked, SIGTTIN)
+                 || ss->actions[SIGTTIN].sa_handler == SIG_IGN)
                /* We are blocking or ignoring SIGTTIN.  Just fail.  */
                err = EIO;
              __spin_unlock (&ss->lock);
index 46fe399970465b9b8e2d31f75ec3459de7007dd6..77b931ccef57991d670ce5c5c5cdeb148da10afa 100644 (file)
@@ -38,8 +38,8 @@ _hurd_ctty_output (io_t port, io_t ctty, error_t (*rpc) (io_t))
             SIGTTOU.  We redo this check at the top of the loop in case
             the signal handler changed the state.  */
          __spin_lock (&ss->lock);
-         if (__sigismember (&ss->blocked, SIGTTOU) ||
-             ss->actions[SIGTTOU].sa_handler == SIG_IGN)
+         if (__sigismember (&ss->blocked, SIGTTOU)
+             || ss->actions[SIGTTOU].sa_handler == SIG_IGN)
            err = EIO;
          else
            err = 0;
index c0bb4a43d377ef20d22de4064141fb9ec3acbdcc..2663d25000c210f58d65fe7d18e6a93b5cd254de 100644 (file)
@@ -266,24 +266,24 @@ reauth_dtable (void)
       __spin_lock (&d->port.lock);
 
       /* Reauthenticate the descriptor's port.  */
-      if (d->port.port != MACH_PORT_NULL &&
-         ! __io_reauthenticate (d->port.port,
-                                ref, MACH_MSG_TYPE_MAKE_SEND) &&
-         ! __USEPORT (AUTH, __auth_user_authenticate
-                      (port,
-                       ref, MACH_MSG_TYPE_MAKE_SEND,
-                       &new)))
+      if (d->port.port != MACH_PORT_NULL
+         && ! __io_reauthenticate (d->port.port,
+                                   ref, MACH_MSG_TYPE_MAKE_SEND)
+         && ! __USEPORT (AUTH, __auth_user_authenticate
+                         (port,
+                          ref, MACH_MSG_TYPE_MAKE_SEND,
+                          &new)))
        {
          /* Replace the port in the descriptor cell
             with the newly reauthenticated port.  */
 
-         if (d->ctty.port != MACH_PORT_NULL &&
-             ! __io_reauthenticate (d->ctty.port,
-                                    ref, MACH_MSG_TYPE_MAKE_SEND) &&
-             ! __USEPORT (AUTH, __auth_user_authenticate
-                          (port,
-                           ref, MACH_MSG_TYPE_MAKE_SEND,
-                           &newctty)))
+         if (d->ctty.port != MACH_PORT_NULL
+             && ! __io_reauthenticate (d->ctty.port,
+                                       ref, MACH_MSG_TYPE_MAKE_SEND)
+             && ! __USEPORT (AUTH, __auth_user_authenticate
+                             (port,
+                              ref, MACH_MSG_TYPE_MAKE_SEND,
+                              &newctty)))
            _hurd_port_set (&d->ctty, newctty);
 
          _hurd_port_locked_set (&d->port, new);
index 09ccc64dcf6aa2ab6a79021b0b146ed9d45d6a5d..8c6378927658c1e52e24df81524c9fcd6f0920f7 100644 (file)
@@ -41,8 +41,8 @@ __getdport (int fd)
       return MACH_PORT_NULL;
     }
 
-  if (fd < 0 || (unsigned int) fd > _hurd_init_dtablesize ||
-      _hurd_init_dtable[fd] == MACH_PORT_NULL)
+  if (fd < 0 || (unsigned int) fd > _hurd_init_dtablesize
+      || _hurd_init_dtable[fd] == MACH_PORT_NULL)
     {
       errno = EBADF;
       return MACH_PORT_NULL;
index 69020a439bd850ac384e4c2e11a61d220c3d9a11..c30f536436831bed85d39bc060a825eac894f489 100644 (file)
@@ -379,8 +379,8 @@ extern mach_msg_timeout_t _hurd_interrupted_rpc_timeout;
        __mach_port_deallocate (__mach_task_self (), msgport);                \
        if ((dealloc_refport) && refport != MACH_PORT_NULL)                   \
          __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);                                  \
     __err;                                                                   \
 })
 
index 29b3619fb04b69591d9ba120256d676134dc6709..44eb614e13f2af07b11a017c6a9be1a902d25af3 100644 (file)
@@ -51,8 +51,8 @@ struct hurd_signal_preemptor
   };
 
 #define HURD_PREEMPT_SIGNAL_P(preemptor, signo, sigcode) \
-  (((preemptor)->signals & sigmask (signo)) && \
-   (sigcode) >= (preemptor)->first && (sigcode) <= (preemptor)->last)
+  (((preemptor)->signals & sigmask (signo)) \
+   && (sigcode) >= (preemptor)->first && (sigcode) <= (preemptor)->last)
 
 
 /* Signal preemptors applying to all threads; locked by _hurd_siglock.  */
index 63f899e711499f010a91ea0ab7950cde10e18811..ea248d0b556dcd6d86d5997eec620cf49d7c3b08 100644 (file)
@@ -52,8 +52,8 @@ _hurdsig_fault_catch_exception_raise (mach_port_t port,
   int signo;
   struct hurd_signal_detail d;
 
-  if (port != forward_sigexc ||
-      thread != _hurd_msgport_thread || task != __mach_task_self ())
+  if (port != forward_sigexc
+      || thread != _hurd_msgport_thread || task != __mach_task_self ())
     return EPERM;              /* Strange bogosity.  */
 
   d.exc = exception;
index 756d96ef56e2a6465da0e9efb9b98ff9b8027dfd..2d7a685409c115d2a93433fea02b5910f973531d 100644 (file)
@@ -78,16 +78,16 @@ fioctl (int fd,
       break;
 
     case FIONBIO:
-      err = HURD_DPORT_USE (fd, (*arg ?
-                                __io_set_some_openmodes :
-                                __io_clear_some_openmodes)
+      err = HURD_DPORT_USE (fd, (*arg
+                                ? __io_set_some_openmodes
+                                __io_clear_some_openmodes)
                            (port, O_NONBLOCK));
       break;
 
     case FIOASYNC:
-      err = HURD_DPORT_USE (fd, (*arg ?
-                                __io_set_some_openmodes :
-                                __io_clear_some_openmodes)
+      err = HURD_DPORT_USE (fd, (*arg
+                                ? __io_set_some_openmodes
+                                __io_clear_some_openmodes)
                            (port, O_ASYNC));
       break;
 
index 22aac59d688d156bbd012f275dea72975d4dbce2..6997b2b73b995aef2c228c26f580e750ba8600b8 100644 (file)
@@ -81,8 +81,8 @@ _hurd_select (int nfds,
          return -1;
        }
 
-      to = (timeout->tv_sec * 1000 +
-            (timeout->tv_nsec + 999999) / 1000000);
+      to = (timeout->tv_sec * 1000
+            (timeout->tv_nsec + 999999) / 1000000);
     }
 
   if (sigmask && __sigprocmask (SIG_SETMASK, sigmask, &oset))
@@ -347,30 +347,30 @@ _hurd_select (int nfds,
            { MACH_MSG_TYPE_INTEGER_T, sizeof (integer_t) * 8, 1, 1, 0, 0 }
          };
 #endif
-         if (msg.head.msgh_id == IO_SELECT_REPLY_MSGID &&
-             msg.head.msgh_size >= sizeof msg.error &&
-             !(msg.head.msgh_bits & MACH_MSGH_BITS_COMPLEX) &&
+         if (msg.head.msgh_id == IO_SELECT_REPLY_MSGID
+             && msg.head.msgh_size >= sizeof msg.error
+             && !(msg.head.msgh_bits & MACH_MSGH_BITS_COMPLEX)
 #ifdef MACH_MSG_TYPE_BIT
-             msg.error.err_type.word == inttype.word
+             && msg.error.err_type.word == inttype.word
 #endif
              )
            {
              /* This is a properly formatted message so far.
                 See if it is a success or a failure.  */
-             if (msg.error.err == EINTR &&
-                 msg.head.msgh_size == sizeof msg.error)
+             if (msg.error.err == EINTR
+                 && msg.head.msgh_size == sizeof msg.error)
                {
                  /* EINTR response; poll for further responses
                     and then return quickly.  */
                  err = EINTR;
                  goto poll;
                }
-             if (msg.error.err ||
-                 msg.head.msgh_size != sizeof msg.success ||
+             if (msg.error.err
+                 || msg.head.msgh_size != sizeof msg.success
 #ifdef MACH_MSG_TYPE_BIT
-                 msg.success.result_type.word != inttype.word ||
+                 || msg.success.result_type.word != inttype.word
 #endif
-                 (msg.success.result & SELECT_ALL) == 0)
+                 || (msg.success.result & SELECT_ALL) == 0)
                {
                  /* Error or bogus reply.  Simulate readiness.  */
                  __mach_msg_destroy (&msg.head);
index 1e4b3466ce81e7130facec739b5bdb5e883edcd5..86c1179c0219606b5763a5e274246eb48e829adf 100644 (file)
@@ -309,8 +309,8 @@ _hurdsig_abort_rpcs (struct hurd_sigstate *ss, int signo, int sigthread,
      receive completes immediately or aborts.  */
   abort_thread (ss, state, reply);
 
-  if (state->basic.PC >= (natural_t) &_hurd_intr_rpc_msg_about_to &&
-      state->basic.PC <  (natural_t) &_hurd_intr_rpc_msg_in_trap)
+  if (state->basic.PC >= (natural_t) &_hurd_intr_rpc_msg_about_to
+      && state->basic.PC < (natural_t) &_hurd_intr_rpc_msg_in_trap)
     {
       /* The thread is about to do the RPC, but hasn't yet entered
         mach_msg.  Mutate the thread's state so it knows not to try
@@ -321,11 +321,11 @@ _hurdsig_abort_rpcs (struct hurd_sigstate *ss, int signo, int sigthread,
       state->basic.SYSRETURN = MACH_SEND_INTERRUPTED;
       *state_change = 1;
     }
-  else if (state->basic.PC == (natural_t) &_hurd_intr_rpc_msg_in_trap &&
+  else if (state->basic.PC == (natural_t) &_hurd_intr_rpc_msg_in_trap
           /* The thread was blocked in the system call.  After thread_abort,
              the return value register indicates what state the RPC was in
              when interrupted.  */
-          state->basic.SYSRETURN == MACH_RCV_INTERRUPTED)
+          && state->basic.SYSRETURN == MACH_RCV_INTERRUPTED)
       {
        /* The RPC request message was sent and the thread was waiting for
           the reply message; now the message receive has been aborted, so
@@ -462,8 +462,8 @@ sigset_t _hurdsig_preempted_set;
 weak_alias (_hurdsig_preemptors, _hurdsig_preempters)
 
 /* Mask of stop signals.  */
-#define STOPSIGS (sigmask (SIGTTIN) | sigmask (SIGTTOU) \
-                 sigmask (SIGSTOP) | sigmask (SIGTSTP))
+#define STOPSIGS (sigmask (SIGTTIN) | sigmask (SIGTTOU) \
+                 sigmask (SIGSTOP) | sigmask (SIGTSTP))
 
 /* Deliver a signal.  SS is not locked.  */
 void
index b2a668dcd2f630b8dc2d42e57ca82e83a137a424..a028151b8f23e895e996646a5926fed92b7bdbbc 100644 (file)
@@ -127,9 +127,9 @@ _hurd_startup (void **argptr, void (*main) (intptr_t *data))
         pointers and fill them in.  We allocate the space for the
         environment pointers immediately after the argv pointers because
         the ELF ABI will expect it.  */
-      argcptr = __alloca (sizeof (intptr_t) +
-                         (argc + 1 + envc + 1) * sizeof (char *) +
-                         sizeof (struct hurd_startup_data));
+      argcptr = __alloca (sizeof (intptr_t)
+                         + (argc + 1 + envc + 1) * sizeof (char *)
+                         sizeof (struct hurd_startup_data));
       *argcptr = argc;
       argv = (void *) (argcptr + 1);
       __argz_extract (args, argslen, argv);
index 1f09c92d921d0676015dcbab0a199ed8879417dd..b7fda2188f3128cde17813d0dc6e00aae6ed2ea9 100644 (file)
@@ -362,12 +362,12 @@ _hurd_intr_rpc_mach_msg (mach_msg_header_t *msg,
                 1, TRUE, FALSE, FALSE, 0 } };
 #endif
 
-        if (m->reply.RetCode == EINTR &&
-           m->header.msgh_size == sizeof m->reply &&
+        if (m->reply.RetCode == EINTR
+           && m->header.msgh_size == sizeof m->reply
 #ifdef MACH_MSG_TYPE_BIT
-           m->check.type == check.i &&
+           && m->check.type == check.i
 #endif
-           !(m->header.msgh_bits & MACH_MSGH_BITS_COMPLEX))
+           && !(m->header.msgh_bits & MACH_MSGH_BITS_COMPLEX))
          {
            /* It is indeed EINTR.  Is the interrupt for us?  */
            if (ss->intr_port != MACH_PORT_NULL)
index c5c2937095384bb48081824dcd67c63173442e0a..06cf8393a86888fc4bf77109277eb31c87c54476 100644 (file)
@@ -121,10 +121,10 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port)
            }
 
          /* An empty RETRYNAME indicates we have the final port.  */
-         if (retryname[0] == '\0' &&
+         if (retryname[0] == '\0'
              /* If reauth'd, we must do one more retry on "" to give the new
                 translator a chance to make a new port for us.  */
-             doretry == FS_RETRY_NORMAL)
+             && doretry == FS_RETRY_NORMAL)
            {
              if (flags & O_NOFOLLOW)
                {
@@ -258,10 +258,10 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port)
              break;
 
            case 'm':
-             if (retryname[1] == 'a' && retryname[2] == 'c' &&
-                 retryname[3] == 'h' && retryname[4] == 't' &&
-                 retryname[5] == 'y' && retryname[6] == 'p' &&
-                 retryname[7] == 'e')
+             if (retryname[1] == 'a' && retryname[2] == 'c'
+                 && retryname[3] == 'h' && retryname[4] == 't'
+                 && retryname[5] == 'y' && retryname[6] == 'p'
+                 && retryname[7] == 'e')
                {
                  error_t err;
                  struct host_basic_info hostinfo;
index a08a16a665b9c2b443721a866ab3f9c566d33923..039b395933fce4815374a43b19a75eb297f25093 100644 (file)
@@ -46,8 +46,8 @@ msgport_server (mach_msg_header_t *inp,
     if ((*d->demux) (inp, outp))
       return 1;
 
-  return (_S_exc_server (inp, outp) ||
-         _S_msg_server (inp, outp));
+  return (_S_exc_server (inp, outp)
+         || _S_msg_server (inp, outp));
 }
 
 /* This is the code that the signal thread runs.  */
index 3d82208ce6d97fdbe2e720bdfa5dbc317a930a43..0476cde2da3c7783097740699e604506d82c0017 100644 (file)
@@ -67,12 +67,12 @@ _hurd_setauth (auth_t new)
          mach_port_t new;
          ref = __mach_reply_port ();
          if (! __io_reauthenticate (_hurd_init_dtable[d],
-                                    ref, MACH_MSG_TYPE_MAKE_SEND) &&
-             ! HURD_PORT_USE (&_hurd_ports[INIT_PORT_AUTH],
-                              __auth_user_authenticate
-                              (port,
-                               ref, MACH_MSG_TYPE_MAKE_SEND,
-                               &new)))
+                                    ref, MACH_MSG_TYPE_MAKE_SEND)
+             && ! HURD_PORT_USE (&_hurd_ports[INIT_PORT_AUTH],
+                                 __auth_user_authenticate
+                                 (port,
+                                  ref, MACH_MSG_TYPE_MAKE_SEND,
+                                  &new)))
            {
              __mach_port_deallocate (__mach_task_self (),
                                      _hurd_init_dtable[d]);
@@ -84,20 +84,20 @@ _hurd_setauth (auth_t new)
   ref = __mach_reply_port ();
   if (__USEPORT (CRDIR,
                 ! __io_reauthenticate (port,
-                                       ref, MACH_MSG_TYPE_MAKE_SEND) &&
-                ! __auth_user_authenticate (new,
-                                            ref, MACH_MSG_TYPE_MAKE_SEND,
-                                            &newport)))
+                                       ref, MACH_MSG_TYPE_MAKE_SEND)
+                && ! __auth_user_authenticate (new,
+                                               ref, MACH_MSG_TYPE_MAKE_SEND,
+                                               &newport)))
     _hurd_port_set (&_hurd_ports[INIT_PORT_CRDIR], newport);
   __mach_port_destroy (__mach_task_self (), ref);
 
   ref = __mach_reply_port ();
   if (__USEPORT (CWDIR,
                 ! __io_reauthenticate (port,
-                                       ref, MACH_MSG_TYPE_MAKE_SEND) &&
-                ! __auth_user_authenticate (new,
-                                            ref, MACH_MSG_TYPE_MAKE_SEND,
-                                            &newport)))
+                                       ref, MACH_MSG_TYPE_MAKE_SEND)
+                && ! __auth_user_authenticate (new,
+                                               ref, MACH_MSG_TYPE_MAKE_SEND,
+                                               &newport)))
     _hurd_port_set (&_hurd_ports[INIT_PORT_CWDIR], newport);
   __mach_port_destroy (__mach_task_self (), ref);
 
index ba272078cf2263ec88e039fda7524c136a4a7953..e016b3e5c79ad25eae24d077650f15664926b425 100644 (file)
    instance, with GCC, -std=gnu11 will have C99-compliant scanf with
    or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
    old extension.  */
-#if defined __USE_GNU &&                                               \
-  (defined __cplusplus                                                 \
-   ? (__cplusplus < 201103L && !defined __GXX_EXPERIMENTAL_CXX0X__)    \
-   : (!defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L))
+#if (defined __USE_GNU                                                 \
+     && (defined __cplusplus                                           \
+        ? (__cplusplus < 201103L && !defined __GXX_EXPERIMENTAL_CXX0X__) \
+        : (!defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L)))
 # define __GLIBC_USE_DEPRECATED_SCANF 1
 #else
 # define __GLIBC_USE_DEPRECATED_SCANF 0
index 1c434ec3a15630d1568f63b4ce9ff662d1022a5a..7bdec86a622cde92da85ab17f216222879040656 100644 (file)
@@ -848,13 +848,13 @@ _IO_deallocate_file (FILE *fp)
 }
 
 #ifdef IO_DEBUG
-# define CHECK_FILE(FILE, RET) do {                    \
-    if ((FILE) == NULL ||                              \
-       ((FILE)->_flags & _IO_MAGIC_MASK) != _IO_MAGIC) \
-      {                                                        \
-       __set_errno (EINVAL);                           \
-       return RET;                                     \
-      }                                                        \
+# define CHECK_FILE(FILE, RET) do {                            \
+    if ((FILE) == NULL                                         \
+       || ((FILE)->_flags & _IO_MAGIC_MASK) != _IO_MAGIC)      \
+      {                                                                \
+       __set_errno (EINVAL);                                   \
+       return RET;                                             \
+      }                                                                \
   } while (0)
 #else
 # define CHECK_FILE(FILE, RET) do { } while (0)
index 36fd08ba80511bdf48d082dc48abb858e7625c90..e6105928da2350208eb8f7ae21e330949b1efe7f 100644 (file)
@@ -3148,11 +3148,12 @@ set_class_defaults (struct locale_ctype_t *ctype,
         the keywords `upper', `lower', `alpha', `digit', `xdigit' and `punct',
        shall belong to this character class."  [P1003.2, 2.5.2.1]  */
     {
-      unsigned long int mask = BIT (tok_upper) | BIT (tok_lower) |
-       BIT (tok_alpha) | BIT (tok_digit) | BIT (tok_xdigit) | BIT (tok_punct);
-      unsigned long int maskw = BITw (tok_upper) | BITw (tok_lower) |
-       BITw (tok_alpha) | BITw (tok_digit) | BITw (tok_xdigit) |
-       BITw (tok_punct);
+      unsigned long int mask = BIT (tok_upper) | BIT (tok_lower)
+       | BIT (tok_alpha) | BIT (tok_digit) | BIT (tok_xdigit)
+       | BIT (tok_punct);
+      unsigned long int maskw = BITw (tok_upper) | BITw (tok_lower)
+       | BITw (tok_alpha) | BITw (tok_digit) | BITw (tok_xdigit)
+       | BITw (tok_punct);
 
       for (size_t cnt = 0; cnt < ctype->class_collection_act; ++cnt)
        if ((ctype->class_collection[cnt] & maskw) != 0)
@@ -3169,11 +3170,12 @@ set_class_defaults (struct locale_ctype_t *ctype,
        and the <space> character shall belong to this character class."
        [P1003.2, 2.5.2.1]  */
     {
-      unsigned long int mask = BIT (tok_upper) | BIT (tok_lower) |
-       BIT (tok_alpha) | BIT (tok_digit) | BIT (tok_xdigit) | BIT (tok_punct);
-      unsigned long int maskw = BITw (tok_upper) | BITw (tok_lower) |
-       BITw (tok_alpha) | BITw (tok_digit) | BITw (tok_xdigit) |
-       BITw (tok_punct);
+      unsigned long int mask = BIT (tok_upper) | BIT (tok_lower)
+       | BIT (tok_alpha) | BIT (tok_digit) | BIT (tok_xdigit)
+       | BIT (tok_punct);
+      unsigned long int maskw = BITw (tok_upper) | BITw (tok_lower)
+       | BITw (tok_alpha) | BITw (tok_digit) | BITw (tok_xdigit)
+       | BITw (tok_punct);
       struct charseq *seq;
 
       for (size_t cnt = 0; cnt < ctype->class_collection_act; ++cnt)
index 76445d75f4858d1b5f416832c9c1710f2850a45c..11cbf02966b166900c024ee105e00eb41bb0e3c7 100644 (file)
@@ -115,11 +115,11 @@ tst_swscanf (FILE * fp, int debug_flg)
 
       if (errno == 0 && !TST_INPUT (swscanf).wch)
        {
-         if (val_int1 != TST_EXPECT (swscanf).val_int ||
-             val_int2 != TST_EXPECT (swscanf).val_uns ||
-             val_flt != TST_EXPECT (swscanf).val_flt ||
-             val_c != TST_EXPECT (swscanf).val_c ||
-             strcmp (val_s, TST_EXPECT (swscanf).val_s))
+         if (val_int1 != TST_EXPECT (swscanf).val_int
+             || val_int2 != TST_EXPECT (swscanf).val_uns
+             || val_flt != TST_EXPECT (swscanf).val_flt
+             || val_c != TST_EXPECT (swscanf).val_c
+             || strcmp (val_s, TST_EXPECT (swscanf).val_s))
            {
              err_count++;
              Result (C_FAILURE, S_SWSCANF, CASE_3,
index 4e355fc6b657ba9ed96a29eb2f6f3800ff0dc823..ce48e8326ecc3a9c13a7e2b73ddc7c9aa8254424 100644 (file)
@@ -132,8 +132,8 @@ do_check (void)
   n = 0;
   while ((ut = getutent ()))
     {
-      if (n < num_entries &&
-         memcmp (ut, &entry[n], sizeof (struct utmp)))
+      if (n < num_entries
+         && memcmp (ut, &entry[n], sizeof (struct utmp)))
        {
          error (0, 0, "UTMP entry does not match");
          return 1;
@@ -160,8 +160,8 @@ simulate_login (const char *line, const char *user)
 
   for (n = 0; n < num_entries; n++)
     {
-      if (strcmp (line, entry[n].ut_line) == 0 ||
-         entry[n].ut_type == DEAD_PROCESS)
+      if (strcmp (line, entry[n].ut_line) == 0
+         || entry[n].ut_type == DEAD_PROCESS)
        {
          if (entry[n].ut_pid == DEAD_PROCESS)
            entry[n].ut_pid = (entry_pid += 27);
index 058c63abd336614b5ac88df83e97b688e6a277a8..ddff44d372639de06fcd87656c7064ad7dbbda1d 100644 (file)
@@ -49,8 +49,8 @@
   ({   \
      int *__iptr = (int *)(ptr);   \
      int __flags = (flags);   \
-     if (*__iptr != 0 ||   \
-         atomic_compare_and_exchange_bool_acq (__iptr, 1, 0) != 0)   \
+     if (*__iptr != 0   \
+         || atomic_compare_and_exchange_bool_acq (__iptr, 1, 0) != 0)   \
        while (1)   \
          {   \
            if (atomic_exchange_acq (__iptr, 2) == 0)   \
@@ -65,8 +65,8 @@
 #define lll_trylock(ptr)   \
   ({   \
      int *__iptr = (int *)(ptr);   \
-     *__iptr == 0 &&   \
-       atomic_compare_and_exchange_bool_acq (__iptr, 1, 0) == 0 ? 0 : -1;   \
+     *__iptr == 0   \
+       && atomic_compare_and_exchange_bool_acq (__iptr, 1, 0) == 0 ? 0 : -1;   \
    })
 
 /* Release the lock at PTR.  */
index 9edf757ef6994d8817d4643769e9fba5ec23f508..c7b14d6d651e49a0591baf1e5f1c3bcb4f93e9fe 100644 (file)
@@ -49,8 +49,8 @@
 #define OVERFLOW_EXC 0x08
 #define INVALID_EXC 0x10
 #define ALL_EXC \
-        (INEXACT_EXC | DIVBYZERO_EXC | UNDERFLOW_EXC | OVERFLOW_EXC \
-         INVALID_EXC)
+        (INEXACT_EXC | DIVBYZERO_EXC | UNDERFLOW_EXC | OVERFLOW_EXC \
+         INVALID_EXC)
 
 static int count_errors;
 
index 934fec169a29678fa2108ba20bed8ef3fe5ca437..fe0cc435b13eec136b206748f290e362015161a7 100644 (file)
@@ -38,8 +38,8 @@
 #define OVERFLOW_EXC 0x08
 #define INVALID_EXC 0x10
 #define ALL_EXC \
-        (INEXACT_EXC | DIVBYZERO_EXC | UNDERFLOW_EXC | OVERFLOW_EXC \
-         INVALID_EXC)
+        (INEXACT_EXC | DIVBYZERO_EXC | UNDERFLOW_EXC | OVERFLOW_EXC \
+         INVALID_EXC)
 static int count_errors;
 
 #if FE_ALL_EXCEPT
index 88bc7ac94209ca7742b13c23dfe25f45aa9c5a54..b1695376dc07872ccbb8d7dfec2e5c2975187f62 100644 (file)
 /* Since version 4.5, gcc also allows one to specify the message printed
    when a deprecated function is used.  clang claims to be gcc 4.2, but
    may also support this feature.  */
-#if __GNUC_PREREQ (4,5) || \
-    __glibc_clang_has_extension (__attribute_deprecated_with_message__)
+#if __GNUC_PREREQ (4,5) \
+    || __glibc_clang_has_extension (__attribute_deprecated_with_message__)
 # define __attribute_deprecated_msg__(msg) \
         __attribute__ ((__deprecated__ (msg)))
 #else
index 58e3a4dc5494066008e5904d3f0bb94402c84fad..c1cfd8dcec858c0c5d1f1ae260351322fcba8381 100644 (file)
@@ -317,8 +317,8 @@ __do_niscall3 (dir_binding *dbp, u_long prog, xdrproc_t xargs, caddr_t req,
          switch (prog)
            {
            case NIS_IBLIST:
-             if ((((nis_result *)resp)->status == NIS_CBRESULTS) &&
-                 (cb != NULL))
+             if ((((nis_result *)resp)->status == NIS_CBRESULTS)
+                 && (cb != NULL))
                {
                  __nis_do_callback (dbp, &((nis_result *) resp)->cookie, cb);
                  break;
index 1668e29ea9de688d9d35b000871a549635be5e08..0a78b1c41ea99fbf827aba563617921ae0d3f427 100644 (file)
@@ -130,8 +130,8 @@ cb_prog_1 (struct svc_req *rqstp, SVCXPRT *transp)
        for (i = 0; i < argument.cbproc_receive_1_arg.entries.entries_len; ++i)
          {
 #define cbproc_entry(a) argument.cbproc_receive_1_arg.entries.entries_val[a]
-           char name[strlen (cbproc_entry(i)->zo_name) +
-                     strlen (cbproc_entry(i)->zo_domain) + 3];
+           char name[strlen (cbproc_entry(i)->zo_name)
+                     strlen (cbproc_entry(i)->zo_domain) + 3];
            char *cp;
 
            cp = stpcpy (name, cbproc_entry(i)->zo_name);
index 5d591cf3dc3619d34cee1aa6877ff5025895a0ec..9313bb0d35eccd47465f286c92737e059f63b52e 100644 (file)
@@ -278,18 +278,18 @@ searchaccess (char *str, unsigned int access)
          cptr++;               /* Remove "=" from beginning */
          /* Clear */
          if (n)
-           result = result & ~((NIS_READ_ACC + NIS_MODIFY_ACC +
-                                NIS_CREATE_ACC + NIS_DESTROY_ACC) << 24);
+           result = result & ~((NIS_READ_ACC + NIS_MODIFY_ACC
+                                NIS_CREATE_ACC + NIS_DESTROY_ACC) << 24);
 
          if (o)
-           result = result & ~((NIS_READ_ACC + NIS_MODIFY_ACC +
-                                NIS_CREATE_ACC + NIS_DESTROY_ACC) << 16);
+           result = result & ~((NIS_READ_ACC + NIS_MODIFY_ACC
+                                NIS_CREATE_ACC + NIS_DESTROY_ACC) << 16);
          if (g)
-           result = result & ~((NIS_READ_ACC + NIS_MODIFY_ACC +
-                                NIS_CREATE_ACC + NIS_DESTROY_ACC) << 8);
+           result = result & ~((NIS_READ_ACC + NIS_MODIFY_ACC
+                                NIS_CREATE_ACC + NIS_DESTROY_ACC) << 8);
          if (w)
-           result = result & ~(NIS_READ_ACC + NIS_MODIFY_ACC +
-                               NIS_CREATE_ACC + NIS_DESTROY_ACC);
+           result = result & ~(NIS_READ_ACC + NIS_MODIFY_ACC
+                               NIS_CREATE_ACC + NIS_DESTROY_ACC);
          while (*cptr != '\0' && *cptr != ',')
            {
              switch (*cptr)
index 043b303a647efab90f31254b4810480a201e89c8..5a76a130ddb1450d47a11b105879377af2f856ba 100644 (file)
@@ -97,9 +97,9 @@ __nis_findfastest_with_timeout (dir_binding *bind,
   for (i = 0; i < bind->server_len; i++)
     for (j = 0; j < bind->server_val[i].ep.ep_len; ++j)
       if (strcmp (bind->server_val[i].ep.ep_val[j].family, "inet") == 0)
-       if ((bind->server_val[i].ep.ep_val[j].proto == NULL) ||
-           (bind->server_val[i].ep.ep_val[j].proto[0] == '-') ||
-           (bind->server_val[i].ep.ep_val[j].proto[0] == '\0'))
+       if ((bind->server_val[i].ep.ep_val[j].proto == NULL)
+           || (bind->server_val[i].ep.ep_val[j].proto[0] == '-')
+           || (bind->server_val[i].ep.ep_val[j].proto[0] == '\0'))
          {
            sin.sin_addr.s_addr =
              inetstr2int (bind->server_val[i].ep.ep_val[j].uaddr);
index 8f05c33b018a0466d020d687a7ecb5cff94c3e40..4ed27a4d4ed0610b057dcaa9a96ec5562165623f 100644 (file)
@@ -51,8 +51,8 @@ internal_ismember (const_nis_name principal, const_nis_name group)
       return 0;
     }
 
-  if ((NIS_RES_NUMOBJ (res) != 1) ||
-      (__type_of (NIS_RES_OBJECT (res)) != NIS_GROUP_OBJ))
+  if ((NIS_RES_NUMOBJ (res) != 1)
+      || (__type_of (NIS_RES_OBJECT (res)) != NIS_GROUP_OBJ))
     {
       nis_freeresult (res);
       return 0;
index bfba625c3309dce713541458d47560df34ea814c..49c3361e89915051fe91ec2fb32c314f5498c879 100644 (file)
@@ -106,8 +106,8 @@ nis_local_principal (void)
              buf[len] = '\0';
            }
 
-         res = nis_list (buf, USE_DGRAM + NO_AUTHINFO + FOLLOW_LINKS +
-                         FOLLOW_PATH, NULL, NULL);
+         res = nis_list (buf, USE_DGRAM + NO_AUTHINFO + FOLLOW_LINKS
+                         FOLLOW_PATH, NULL, NULL);
 
          if (res == NULL)
            goto nobody;
index f0aac2ec945660325b9e98d458a9f9c427161ad2..25144a532f2d17ddc9e13f19b7e6baf2dcb40db7 100644 (file)
@@ -197,9 +197,9 @@ _nss_nis_getrpcbyname_r (const char *name, struct rpcent *rpc,
     return status;
 
   int found = 0;
-  while (!found &&
-         ((status = internal_nis_getrpcent_r (rpc, buffer, buflen, errnop,
-                                             &data)) == NSS_STATUS_SUCCESS))
+  while (!found
+         && ((status = internal_nis_getrpcent_r (rpc, buffer, buflen, errnop,
+                                                &data)) == NSS_STATUS_SUCCESS))
     {
       if (strcmp (rpc->r_name, name) == 0)
        found = 1;
index 99c0932e7e5932c460e62f9b3ec82cce94ff69b3..3ca86437b41769314aaf05fc57999ca78f01f3bd 100644 (file)
@@ -87,9 +87,9 @@ _nss_nisplus_getnetgrent_r (struct __netgrent *result, char *buffer,
 
       result->type = triple_val;
 
-      if (hostlen == 0 ||
-         NISENTRYVAL (result->position, 2,
-                      (nis_result *) result->data)[0] == '\0')
+      if (hostlen == 0
+         || NISENTRYVAL (result->position, 2,
+                         (nis_result *) result->data)[0] == '\0')
        result->val.triple.host = NULL;
       else
        {
@@ -100,9 +100,9 @@ _nss_nisplus_getnetgrent_r (struct __netgrent *result, char *buffer,
          *cp++ = '\0';
        }
 
-      if (userlen == 0 ||
-         NISENTRYVAL (result->position, 3,
-                      (nis_result *) result->data)[0] == '\0')
+      if (userlen == 0
+         || NISENTRYVAL (result->position, 3,
+                         (nis_result *) result->data)[0] == '\0')
        result->val.triple.user = NULL;
       else
        {
@@ -113,9 +113,9 @@ _nss_nisplus_getnetgrent_r (struct __netgrent *result, char *buffer,
          *cp++ = '\0';
        }
 
-      if (domainlen == 0 ||
-         NISENTRYVAL (result->position, 4,
-                      (nis_result *) result->data)[0] == '\0')
+      if (domainlen == 0
+         || NISENTRYVAL (result->position, 4,
+                         (nis_result *) result->data)[0] == '\0')
        result->val.triple.domain = NULL;
       else
        {
index 210daebfe4beb90a2fd5ec68cdaf74aae9552bd5..3201e375a2b67eecd8a2bf42cb819810ddc3af4b 100644 (file)
@@ -436,9 +436,9 @@ yp_match (const char *indomain, const char *inmap, const char *inkey,
   ypresp_val resp;
   enum clnt_stat result;
 
-  if (indomain == NULL || indomain[0] == '\0' ||
-      inmap == NULL || inmap[0] == '\0' ||
-      inkey == NULL || inkey[0] == '\0' || inkeylen <= 0)
+  if (indomain == NULL || indomain[0] == '\0'
+      || inmap == NULL || inmap[0] == '\0'
+      || inkey == NULL || inkey[0] == '\0' || inkeylen <= 0)
     return YPERR_BADARGS;
 
   req.domain = (char *) indomain;
@@ -481,8 +481,8 @@ yp_first (const char *indomain, const char *inmap, char **outkey,
   ypresp_key_val resp;
   enum clnt_stat result;
 
-  if (indomain == NULL || indomain[0] == '\0' ||
-      inmap == NULL || inmap[0] == '\0')
+  if (indomain == NULL || indomain[0] == '\0'
+      || inmap == NULL || inmap[0] == '\0')
     return YPERR_BADARGS;
 
   req.domain = (char *) indomain;
@@ -537,9 +537,9 @@ yp_next (const char *indomain, const char *inmap, const char *inkey,
   ypresp_key_val resp;
   enum clnt_stat result;
 
-  if (indomain == NULL || indomain[0] == '\0' ||
-      inmap == NULL || inmap[0] == '\0' ||
-      inkeylen <= 0 || inkey == NULL || inkey[0] == '\0')
+  if (indomain == NULL || indomain[0] == '\0'
+      || inmap == NULL || inmap[0] == '\0'
+      || inkeylen <= 0 || inkey == NULL || inkey[0] == '\0')
     return YPERR_BADARGS;
 
   req.domain = (char *) indomain;
@@ -592,8 +592,8 @@ yp_master (const char *indomain, const char *inmap, char **outname)
   ypresp_master resp;
   enum clnt_stat result;
 
-  if (indomain == NULL || indomain[0] == '\0' ||
-      inmap == NULL || inmap[0] == '\0')
+  if (indomain == NULL || indomain[0] == '\0'
+      || inmap == NULL || inmap[0] == '\0')
     return YPERR_BADARGS;
 
   req.domain = (char *) indomain;
@@ -622,8 +622,8 @@ yp_order (const char *indomain, const char *inmap, unsigned int *outorder)
   struct ypresp_order resp;
   enum clnt_stat result;
 
-  if (indomain == NULL || indomain[0] == '\0' ||
-      inmap == NULL || inmap[0] == '\0')
+  if (indomain == NULL || indomain[0] == '\0'
+      || inmap == NULL || inmap[0] == '\0')
     return YPERR_BADARGS;
 
   req.domain = (char *) indomain;
index 10d13b85c240b69ac7f5a8edd15fb87eb764e8a2..94a2f6e9afa599fe99b783cfc70e2b4b7458bd87 100644 (file)
@@ -134,9 +134,9 @@ cache_addhst (struct database_dyn *db, int fd, request_header *req,
          const hst_response_header *resp = (errval == EAGAIN
                                             ? &tryagain : &notfound);
 
-         if (fd != -1 &&
-             TEMP_FAILURE_RETRY (send (fd, resp, total,
-                                       MSG_NOSIGNAL)) != total)
+         if (fd != -1
+             && TEMP_FAILURE_RETRY (send (fd, resp, total,
+                                          MSG_NOSIGNAL)) != total)
            all_written = false;
 
          /* If we have a transient error or cannot permanently store
index 02823baac647406b452c52c74c169f47df77bfe4..186a8b58b55bdca90e6f44991bfa87a8713a79db 100644 (file)
@@ -366,8 +366,8 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req,
              // XXX async OK?
              uintptr_t pval = (uintptr_t) dataset & ~pagesize_m1;
              msync ((void *) pval,
-                    ((uintptr_t) dataset & pagesize_m1) + total +
-                    req->key_len, MS_ASYNC);
+                    ((uintptr_t) dataset & pagesize_m1) + total
+                    req->key_len, MS_ASYNC);
            }
 
          (void) cache_add (INITGROUPS, cp, req->key_len, &dataset->head, true,
index 2a39fd08b7ed6581529028116b77c5d3fcd4633d..ac73e580b7b637ba6fdb2db8675bd091edd56d49 100644 (file)
@@ -138,8 +138,8 @@ copy_pwd_changes (struct passwd *dest, struct passwd *src,
     {
       if (buffer == NULL)
        dest->pw_passwd = strdup (src->pw_passwd);
-      else if (dest->pw_passwd &&
-              strlen (dest->pw_passwd) >= strlen (src->pw_passwd))
+      else if (dest->pw_passwd
+              && strlen (dest->pw_passwd) >= strlen (src->pw_passwd))
        strcpy (dest->pw_passwd, src->pw_passwd);
       else
        {
@@ -154,8 +154,8 @@ copy_pwd_changes (struct passwd *dest, struct passwd *src,
     {
       if (buffer == NULL)
        dest->pw_gecos = strdup (src->pw_gecos);
-      else if (dest->pw_gecos &&
-              strlen (dest->pw_gecos) >= strlen (src->pw_gecos))
+      else if (dest->pw_gecos
+              && strlen (dest->pw_gecos) >= strlen (src->pw_gecos))
        strcpy (dest->pw_gecos, src->pw_gecos);
       else
        {
@@ -184,8 +184,8 @@ copy_pwd_changes (struct passwd *dest, struct passwd *src,
     {
       if (buffer == NULL)
        dest->pw_shell = strdup (src->pw_shell);
-      else if (dest->pw_shell &&
-              strlen (dest->pw_shell) >= strlen (src->pw_shell))
+      else if (dest->pw_shell
+              && strlen (dest->pw_shell) >= strlen (src->pw_shell))
        strcpy (dest->pw_shell, src->pw_shell);
       else
        {
@@ -943,8 +943,8 @@ internal_getpwuid_r (uid_t uid, struct passwd *result, ent_t *ent,
          memcpy (buf, &result->pw_name[2], len);
 
          status = getpwuid_plususer (uid, result, buffer, buflen, errnop);
-         if (status == NSS_STATUS_SUCCESS &&
-             innetgr (buf, NULL, result->pw_name, NULL))
+         if (status == NSS_STATUS_SUCCESS
+             && innetgr (buf, NULL, result->pw_name, NULL))
            return NSS_STATUS_NOTFOUND;
 
          continue;
@@ -990,8 +990,8 @@ internal_getpwuid_r (uid_t uid, struct passwd *result, ent_t *ent,
          memcpy (buf, &result->pw_name[1], len);
 
          status = getpwuid_plususer (uid, result, buffer, buflen, errnop);
-         if (status == NSS_STATUS_SUCCESS &&
-             innetgr (buf, NULL, result->pw_name, NULL))
+         if (status == NSS_STATUS_SUCCESS
+             && innetgr (buf, NULL, result->pw_name, NULL))
            return NSS_STATUS_NOTFOUND;
          continue;
        }
index 4e4980fd7810148450fb6e09b88f55b1bf018bc4..5d0b31847eecc42dd93b47f0a0ee4e3f9e239157 100644 (file)
@@ -127,8 +127,8 @@ copy_spwd_changes (struct spwd *dest, struct spwd *src,
     {
       if (buffer == NULL)
        dest->sp_pwdp = strdup (src->sp_pwdp);
-      else if (dest->sp_pwdp &&
-              strlen (dest->sp_pwdp) >= strlen (src->sp_pwdp))
+      else if (dest->sp_pwdp
+              && strlen (dest->sp_pwdp) >= strlen (src->sp_pwdp))
        strcpy (dest->sp_pwdp, src->sp_pwdp);
       else
        {
index a5f3fe15d3324903550373c918da285386f989a0..378b80af8f394a30595c102c6fc617681d6e7b13 100644 (file)
@@ -54,14 +54,14 @@ typedef __SIZE_TYPE__ size_t;
 # define GLOB_ONLYDIR   (1 << 13)/* Match only directories.  */
 # define GLOB_TILDE_CHECK (1 << 14)/* Like GLOB_TILDE but return an error
                                      if the user name is not available.  */
-# define __GLOB_FLAGS  (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \
-                        GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND|     \
-                        GLOB_PERIOD|GLOB_ALTDIRFUNC|GLOB_BRACE|     \
-                        GLOB_NOMAGIC|GLOB_TILDE|GLOB_ONLYDIR|GLOB_TILDE_CHECK)
+# define __GLOB_FLAGS  (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS  \
+                        |GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND     \
+                        |GLOB_PERIOD|GLOB_ALTDIRFUNC|GLOB_BRACE     \
+                        |GLOB_NOMAGIC|GLOB_TILDE|GLOB_ONLYDIR|GLOB_TILDE_CHECK)
 #else
-# define __GLOB_FLAGS  (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \
-                        GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND|     \
-                        GLOB_PERIOD)
+# define __GLOB_FLAGS  (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS  \
+                        |GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND     \
+                        |GLOB_PERIOD)
 #endif
 
 /* Error returns from `glob'.  */
index cc85f35ac586869b040c93699ceb74cf36d57e01..7525355a9b154427ce2181d095a61fb87e98a21b 100644 (file)
@@ -1800,8 +1800,8 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
   token->word_char = 0;
 #ifdef RE_ENABLE_I18N
   token->mb_partial = 0;
-  if (input->mb_cur_max > 1 &&
-      !re_string_first_byte (input, re_string_cur_idx (input)))
+  if (input->mb_cur_max > 1
+      && !re_string_first_byte (input, re_string_cur_idx (input)))
     {
       token->type = CHARACTER;
       token->mb_partial = 1;
@@ -1988,8 +1988,8 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
       token->type = OP_PERIOD;
       break;
     case '^':
-      if (!(syntax & (RE_CONTEXT_INDEP_ANCHORS | RE_CARET_ANCHORS_HERE)) &&
-         re_string_cur_idx (input) != 0)
+      if (!(syntax & (RE_CONTEXT_INDEP_ANCHORS | RE_CARET_ANCHORS_HERE))
+         && re_string_cur_idx (input) != 0)
        {
          char prev = re_string_peek_byte (input, -1);
          if (!(syntax & RE_NEWLINE_ALT) || prev != '\n')
@@ -1999,8 +1999,8 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
       token->opr.ctx_type = LINE_FIRST;
       break;
     case '$':
-      if (!(syntax & RE_CONTEXT_INDEP_ANCHORS) &&
-         re_string_cur_idx (input) + 1 != re_string_length (input))
+      if (!(syntax & RE_CONTEXT_INDEP_ANCHORS)
+         && re_string_cur_idx (input) + 1 != re_string_length (input))
        {
          re_token_t next;
          re_string_skip_bytes (input, 1);
@@ -2034,8 +2034,8 @@ peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
   token->opr.c = c;
 
 #ifdef RE_ENABLE_I18N
-  if (input->mb_cur_max > 1 &&
-      !re_string_first_byte (input, re_string_cur_idx (input)))
+  if (input->mb_cur_max > 1
+      && !re_string_first_byte (input, re_string_cur_idx (input)))
     {
       token->type = CHARACTER;
       return 1;
@@ -2333,8 +2333,8 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
        }
       FALLTHROUGH;
     case OP_CLOSE_SUBEXP:
-      if ((token->type == OP_CLOSE_SUBEXP) &&
-         !(syntax & RE_UNMATCHED_RIGHT_PAREN_ORD))
+      if ((token->type == OP_CLOSE_SUBEXP)
+         && !(syntax & RE_UNMATCHED_RIGHT_PAREN_ORD))
        {
          *err = REG_ERPAREN;
          return NULL;
index 084b1222d95b62eb2930166060174ef78cb74b02..4ff30a79c09a86f8f36127ed453a3b29349ebfa6 100644 (file)
@@ -2204,9 +2204,9 @@ sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx,
   int naccepted;
   /* Check the node can accept "multi byte".  */
   naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx);
-  if (naccepted > 0 && str_idx + naccepted <= max_str_idx &&
-      !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted],
-                           dfa->nexts[node_idx]))
+  if (naccepted > 0 && str_idx + naccepted <= max_str_idx
+      && !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted],
+                              dfa->nexts[node_idx]))
     /* The node can't accept the "multi byte", or the
        destination was already thrown away, then the node
        couldn't accept the current input "multi byte".   */
@@ -3782,10 +3782,10 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
       /* FIXME: I don't think this if is needed, as both '\n'
         and '\0' are char_len == 1.  */
       /* '.' accepts any one character except the following two cases.  */
-      if ((!(dfa->syntax & RE_DOT_NEWLINE) &&
-          re_string_byte_at (input, str_idx) == '\n') ||
-         ((dfa->syntax & RE_DOT_NOT_NULL) &&
-          re_string_byte_at (input, str_idx) == '\0'))
+      if ((!(dfa->syntax & RE_DOT_NEWLINE)
+          && re_string_byte_at (input, str_idx) == '\n')
+         || ((dfa->syntax & RE_DOT_NOT_NULL)
+             && re_string_byte_at (input, str_idx) == '\0'))
        return 0;
       return char_len;
     }
index 8dae1414f9b49d3ca60c7c0ff01f64224ff9771c..00c9470ba55dff4d2358f91e9c9870e3525e074e 100644 (file)
@@ -84,8 +84,8 @@ do_test (void)
 
   /* Executes a /bin/sh echo $$ 2>&1 > ${objpfx}tst-spawn3.pid .  */
   const char pidfile[] = OBJPFX "tst-spawn3.pid";
-  if (posix_spawn_file_actions_addopen (&a, STDOUT_FILENO, pidfile, O_WRONLY |
-                                       O_CREAT | O_TRUNC, 0644) != 0)
+  if (posix_spawn_file_actions_addopen (&a, STDOUT_FILENO, pidfile, O_WRONLY
+                                       O_CREAT | O_TRUNC, 0644) != 0)
     FAIL_EXIT1 ("posix_spawn_file_actions_addopen");
 
   if (posix_spawn_file_actions_adddup2 (&a, STDOUT_FILENO, STDERR_FILENO) != 0)
index 0f2da81f331362ebc9cf85015313f2cfe285a71c..10a0768a6bcb3a88011f8ae668245d88eb826966 100644 (file)
@@ -508,8 +508,8 @@ testit (struct test_case_struct *tc)
          }
 
       for (i = 0; i < we.we_wordc; ++i)
-       if (we.we_wordv[i+start_offs] == NULL ||
-           strcmp (tc->wordv[i], we.we_wordv[i+start_offs]) != 0)
+       if (we.we_wordv[i+start_offs] == NULL
+           || strcmp (tc->wordv[i], we.we_wordv[i+start_offs]) != 0)
          {
            bzzzt = 1;
            break;
@@ -534,10 +534,10 @@ testit (struct test_case_struct *tc)
        }
       printf ("\n");
     }
-  else if (retval != 0 && retval != WRDE_NOSPACE &&
-          (we.we_wordc != sav_we.we_wordc ||
-            we.we_wordv != sav_we.we_wordv ||
-            we.we_offs != sav_we.we_offs))
+  else if (retval != 0 && retval != WRDE_NOSPACE
+          && (we.we_wordc != sav_we.we_wordc
+              || we.we_wordv != sav_we.we_wordv
+              || we.we_offs != sav_we.we_offs))
     {
       bzzzt = 1;
       printf ("FAILED to restore wordexp_t members\n");
index 248de77fba6c614fdc916657d0a5586a25d36dd9..22c6d18a9c312b155b4636f3cd33d4f5d24df60f 100644 (file)
@@ -285,8 +285,8 @@ parse_tilde (char **word, size_t *word_length, size_t *max_length,
 
   for (i = 1 + *offset; words[i]; i++)
     {
-      if (words[i] == ':' || words[i] == '/' || words[i] == ' ' ||
-         words[i] == '\t' || words[i] == 0 )
+      if (words[i] == ':' || words[i] == '/' || words[i] == ' '
+         || words[i] == '\t' || words[i] == 0 )
        break;
 
       if (words[i] == '\\')
@@ -1070,8 +1070,8 @@ exec_comm (char *comm, char **word, size_t *word_length, size_t *max_length,
   /* Chop off trailing newlines (required by POSIX.2)  */
   /* Ensure we don't go back further than the beginning of the
      substitution (i.e. remove maxnewlines bytes at most) */
-  while (maxnewlines-- != 0 &&
-        *word_length > 0 && (*word)[*word_length - 1] == '\n')
+  while (maxnewlines-- != 0
+        && *word_length > 0 && (*word)[*word_length - 1] == '\n')
     {
       (*word)[--*word_length] = '\0';
 
index 148b9e1e70143435fbbf18fe436b731841a76ab3..060f13fe4940e54b500273b63b86ef9a623cac9e 100644 (file)
@@ -33,8 +33,8 @@ enum
     WRDE_REUSE = (1 << 3),     /* Reuse storage in PWORDEXP.  */
     WRDE_SHOWERR = (1 << 4),   /* Don't redirect stderr to /dev/null.  */
     WRDE_UNDEF = (1 << 5),     /* Error for expanding undefined variables.  */
-    __WRDE_FLAGS = (WRDE_DOOFFS | WRDE_APPEND | WRDE_NOCMD |
-                   WRDE_REUSE | WRDE_SHOWERR | WRDE_UNDEF)
+    __WRDE_FLAGS = (WRDE_DOOFFS | WRDE_APPEND | WRDE_NOCMD
+                   WRDE_REUSE | WRDE_SHOWERR | WRDE_UNDEF)
   };
 
 /* Structure describing a word-expansion run.  */
index dd79c84eb05a9fd17532c4c65a98a55e493d35be..f7d916533f14bf528036e79bb8997176af4ae4a3 100644 (file)
@@ -22,8 +22,8 @@
 /* Return the number of 1/VTIMES_UNITS_PER_SECOND-second
    units in the `struct timeval' TV.  */
 #define TIMEVAL_TO_VTIMES(tv) \
-  ((tv.tv_sec * VTIMES_UNITS_PER_SECOND) \
-   (tv.tv_usec * VTIMES_UNITS_PER_SECOND / 1000000))
+  ((tv.tv_sec * VTIMES_UNITS_PER_SECOND) \
+   (tv.tv_usec * VTIMES_UNITS_PER_SECOND / 1000000))
 
 /* If VT is not NULL, write statistics for WHO into *VT.
    Return 0 for success, -1 for failure.  */
index 171cf2473180cc9477ca2c4d95f403d29e2b6268..0ff4a029c8f068b37affbf4b498e721b5cd76e42 100644 (file)
@@ -26,9 +26,9 @@
 int
 __sigjmp_save (sigjmp_buf env, int savemask)
 {
-  env[0].__mask_was_saved = (savemask &&
-                            __sigprocmask (SIG_BLOCK, (sigset_t *) NULL,
-                                           (sigset_t *) &env[0].__saved_mask) == 0);
+  env[0].__mask_was_saved = (savemask
+                            && __sigprocmask (SIG_BLOCK, (sigset_t *) NULL,
+                                              (sigset_t *) &env[0].__saved_mask) == 0);
 
   return 0;
 }
index 8c6e434d2af643fb7c5554970206289006bc7c7f..ec2b0862605284df990cdcbbcd2af2488f6fcc6d 100644 (file)
@@ -459,8 +459,8 @@ __printf_fp_l (FILE *fp, locale_t loc,
        }
       else
        {
-         cy = __mpn_lshift (p.frac +
-                            (p.exponent + to_shift) / BITS_PER_MP_LIMB,
+         cy = __mpn_lshift (p.frac
+                            (p.exponent + to_shift) / BITS_PER_MP_LIMB,
                             fp_input, p.fracsize,
                             (p.exponent + to_shift) % BITS_PER_MP_LIMB);
          p.fracsize += (p.exponent + to_shift) / BITS_PER_MP_LIMB;
@@ -533,8 +533,8 @@ __printf_fp_l (FILE *fp, locale_t loc,
                                  &__tens[powers->arrayoff
                                         + _FPIO_CONST_OFFSET],
                                  powers->arraysize - _FPIO_CONST_OFFSET);
-                 p.tmpsize = p.scalesize +
-                   powers->arraysize - _FPIO_CONST_OFFSET;
+                 p.tmpsize = p.scalesize
+                   powers->arraysize - _FPIO_CONST_OFFSET;
                  if (cy == 0)
                    --p.tmpsize;
                }
@@ -717,10 +717,10 @@ __printf_fp_l (FILE *fp, locale_t loc,
                 multiplication was not valid.  This is because we cannot
                 determine the number of bits in the result in advance.  */
              if (incr < p.exponent + 3
-                 || (incr == p.exponent + 3 &&
-                     (p.tmp[p.tmpsize - 1] < topval[1]
-                      || (p.tmp[p.tmpsize - 1] == topval[1]
-                          && p.tmp[p.tmpsize - 2] < topval[0]))))
+                 || (incr == p.exponent + 3
+                     && (p.tmp[p.tmpsize - 1] < topval[1]
+                         || (p.tmp[p.tmpsize - 1] == topval[1]
+                             && p.tmp[p.tmpsize - 2] < topval[0]))))
                {
                  /* The factor is right.  Adapt binary and decimal
                     exponents.  */
@@ -809,8 +809,8 @@ __printf_fp_l (FILE *fp, locale_t loc,
         numbers are in the range of 1.0 <= |fp| < 8.0.  We simply
         shift it to the right place and divide it by 1.0 to get the
         leading digit.  (Of course this division is not really made.)  */
-      assert (0 <= p.exponent && p.exponent < 3 &&
-             p.exponent + to_shift < BITS_PER_MP_LIMB);
+      assert (0 <= p.exponent && p.exponent < 3
+             && p.exponent + to_shift < BITS_PER_MP_LIMB);
 
       /* Now shift the input value to its right place. */
       cy = __mpn_lshift (p.frac, fp_input, p.fracsize, (p.exponent + to_shift));
index a77f0aa4c5c5b20ff6b84e597fed629b59b61df2..cc682c013d630cb230bc503043a4d3f4b64d29b4 100644 (file)
@@ -31,9 +31,9 @@ check (const char *name, FILE *stream, int fd)
 static int
 do_test (void)
 {
-  return (check ("stdin", stdin, STDIN_FILENO) ||
-         check ("stdout", stdout, STDOUT_FILENO) ||
-         check ("stderr", stderr, STDERR_FILENO));
+  return (check ("stdin", stdin, STDIN_FILENO)
+         || check ("stdout", stdout, STDOUT_FILENO)
+         || check ("stderr", stderr, STDERR_FILENO));
 }
 
 #define TEST_FUNCTION do_test ()
index c124a9507bf5b622d47e7308b03282c83d5416fb..ead2b04cb96b0346dde876e5d41418fae2cc8b0d 100644 (file)
@@ -1290,8 +1290,8 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap, unsigned int mode_flags)
 
 #ifdef ORIENT
   /* Check for correct orientation.  */
-  if (_IO_vtable_offset (s) == 0 &&
-      _IO_fwide (s, sizeof (CHAR_T) == 1 ? -1 : 1)
+  if (_IO_vtable_offset (s) == 0
+      && _IO_fwide (s, sizeof (CHAR_T) == 1 ? -1 : 1)
       != (sizeof (CHAR_T) == 1 ? -1 : 1))
     /* The stream is already oriented otherwise.  */
     return EOF;
index cac9d6dd727e474c6c63ab0d3de6cf882cdac695..3a3c3d07180d6ddec5e1609725da5315db3f7cc8 100644 (file)
@@ -386,17 +386,17 @@ __vstrfmon_l_internal (char *s, size_t maxsize, locale_t loc,
       /* Check for degenerate cases */
       if (sep_by_space == 2)
        {
-         if (sign_posn == 0 ||
-             (sign_posn == 1 && !cs_precedes) ||
-             (sign_posn == 2 && cs_precedes))
+         if (sign_posn == 0
+             || (sign_posn == 1 && !cs_precedes)
+             || (sign_posn == 2 && cs_precedes))
            /* sign and symbol are not adjacent, so no separator */
            sep_by_space = 0;
        }
       if (other_sep_by_space == 2)
        {
-         if (other_sign_posn == 0 ||
-             (other_sign_posn == 1 && !other_cs_precedes) ||
-             (other_sign_posn == 2 && other_cs_precedes))
+         if (other_sign_posn == 0
+             || (other_sign_posn == 1 && !other_cs_precedes)
+             || (other_sign_posn == 2 && other_cs_precedes))
            /* sign and symbol are not adjacent, so no separator */
            other_sep_by_space = 0;
        }
@@ -444,8 +444,8 @@ __vstrfmon_l_internal (char *s, size_t maxsize, locale_t loc,
            ++other_left_bytes;
          else if (other_sign_posn == 1)
            other_left_bytes += strlen (other_sign_string);
-         else if (other_cs_precedes &&
-                  (other_sign_posn == 3 || other_sign_posn == 4))
+         else if (other_cs_precedes
+                  && (other_sign_posn == 3 || other_sign_posn == 4))
            other_left_bytes += strlen (other_sign_string);
 
          /* Compare the number of bytes preceding the value for
index ccd56d0c6fe768fb3d052ea485303ad7f405a943..9bef59892a4c6f5114096c611c96a720c79e48dd 100644 (file)
@@ -280,11 +280,12 @@ round_and_return (mp_limb_t *retval, intmax_t exponent, int negative,
                  mp_limb_t cy = __mpn_add_1 (retval_normal, retval,
                                              RETURN_LIMB_SIZE, 1);
 
-                 if (((MANT_DIG % BITS_PER_MP_LIMB) == 0 && cy) ||
-                     ((MANT_DIG % BITS_PER_MP_LIMB) != 0 &&
-                      ((retval_normal[RETURN_LIMB_SIZE - 1]
-                       & (((mp_limb_t) 1) << (MANT_DIG % BITS_PER_MP_LIMB)))
-                       != 0)))
+                 if (((MANT_DIG % BITS_PER_MP_LIMB) == 0 && cy)
+                     || ((MANT_DIG % BITS_PER_MP_LIMB) != 0
+                         && ((retval_normal[RETURN_LIMB_SIZE - 1]
+                              & (((mp_limb_t) 1)
+                                 << (MANT_DIG % BITS_PER_MP_LIMB)))
+                             != 0)))
                    is_tiny = false;
                }
            }
@@ -325,10 +326,10 @@ round_and_return (mp_limb_t *retval, intmax_t exponent, int negative,
     {
       mp_limb_t cy = __mpn_add_1 (retval, retval, RETURN_LIMB_SIZE, 1);
 
-      if (((MANT_DIG % BITS_PER_MP_LIMB) == 0 && cy) ||
-         ((MANT_DIG % BITS_PER_MP_LIMB) != 0 &&
-          (retval[RETURN_LIMB_SIZE - 1]
-           & (((mp_limb_t) 1) << (MANT_DIG % BITS_PER_MP_LIMB))) != 0))
+      if (((MANT_DIG % BITS_PER_MP_LIMB) == 0 && cy)
+         || ((MANT_DIG % BITS_PER_MP_LIMB) != 0
+             && (retval[RETURN_LIMB_SIZE - 1]
+                 & (((mp_limb_t) 1) << (MANT_DIG % BITS_PER_MP_LIMB))) != 0))
        {
          ++exponent;
          (void) __mpn_rshift (retval, retval, RETURN_LIMB_SIZE, 1);
@@ -861,9 +862,9 @@ ____STRTOF_INTERNAL (const STRING_TYPE *nptr, STRING_TYPE **endptr, int group,
     {
       cp += decimal_len;
       c = *cp;
-      while ((c >= L_('0') && c <= L_('9')) ||
-            (base == 16 && ({ CHAR_TYPE lo = TOLOWER (c);
-                              lo >= L_('a') && lo <= L_('f'); })))
+      while ((c >= L_('0') && c <= L_('9'))
+            || (base == 16 && ({ CHAR_TYPE lo = TOLOWER (c);
+                                 lo >= L_('a') && lo <= L_('f'); })))
        {
          if (c != L_('0') && lead_zero == (size_t) -1)
            lead_zero = dig_no - int_no;
index f6b626611ddfc5aa041c7ed398f293236d71b10a..2e447f11af3a280f24943af0c24aaf870c5a45d7 100644 (file)
@@ -103,10 +103,10 @@ test_ ## FSUF (void)                                                      \
   for (i = 0; i < sizeof (htest) / sizeof (htest[0]); i++)             \
     {                                                                  \
       rc = FTOSTR (buf, 50, htest[i].fmt, htest[i].t.FSUF);            \
-      if (strcmp (buf, htest[i].exp[0]) == 0 ||                                \
-         strcmp (buf, htest[i].exp[1]) == 0 ||                         \
-         strcmp (buf, htest[i].exp[2]) == 0 ||                         \
-         strcmp (buf, htest[i].exp[3]) == 0)                           \
+      if (strcmp (buf, htest[i].exp[0]) == 0                           \
+         || strcmp (buf, htest[i].exp[1]) == 0                         \
+         || strcmp (buf, htest[i].exp[2]) == 0                         \
+         || strcmp (buf, htest[i].exp[3]) == 0)                        \
        continue;                                                       \
       else                                                             \
        {                                                               \
index e9fb8c5cb2fc6892e1b4c91055ca06056caa2bfb..1105bcf93168e52686e874c8928d845c9c18250c 100644 (file)
@@ -30,8 +30,8 @@
 size_t
 STRCSPN (const char *str, const char *reject)
 {
-  if (__glibc_unlikely (reject[0] == '\0') ||
-      __glibc_unlikely (reject[1] == '\0'))
+  if (__glibc_unlikely (reject[0] == '\0')
+      || __glibc_unlikely (reject[1] == '\0'))
     return __strchrnul (str, reject [0]) - str;
 
   /* Use multiple small memsets to enable inlining on most targets.  */
index bdd14e2a8cf4e661e266961426b0e7e2ade03167..2ac7f18c71bae770868a9155c4e46e76be717a6b 100644 (file)
@@ -48,10 +48,10 @@ simple_memmem (const void *haystack, size_t haystack_len, const void *needle,
     return NULL;
 
   for (begin = (const char *) haystack; begin <= last_possible; ++begin)
-    if (begin[0] == ((const char *) needle)[0] &&
-        !memcmp ((const void *) &begin[1],
-                 (const void *) ((const char *) needle + 1),
-                 needle_len - 1))
+    if (begin[0] == ((const char *) needle)[0]
+        && !memcmp ((const void *) &begin[1],
+                   (const void *) ((const char *) needle + 1),
+                   needle_len - 1))
       return (void *) begin;
 
   return NULL;
index 56298543bac1c7975d1794e7ac544b71f2b1b67b..9c56eb2765d045dd0fb1ae463190b1c6ea80ca26 100644 (file)
@@ -46,9 +46,9 @@ tcsetattr (int fd, int optional_actions, const struct termios *termios_p)
       return -1;
     }
 
-  if (bad_speed(termios_p->__ospeed) ||
-      bad_speed(termios_p->__ispeed == 0 ?
-               termios_p->__ospeed : termios_p->__ispeed))
+  if (bad_speed(termios_p->__ospeed)
+      || bad_speed(termios_p->__ispeed == 0
+                  ? termios_p->__ospeed : termios_p->__ispeed))
     {
       __set_errno (EINVAL);
       return -1;
index 4485b80aa91d29fa312e556244bcfa11a6896ad8..3123ef016c97f1f623fae928790b64093a524834 100644 (file)
@@ -162,8 +162,8 @@ _nl_parse_alt_digit (const char **strp, struct __locale_data *current)
       || ! current->private.time->alt_digits_initialized)
     _nl_init_alt_digit (current);
 
-  if (current->private.time != NULL &&
-      current->private.time->alt_digits != NULL)
+  if (current->private.time != NULL
+      && current->private.time->alt_digits != NULL)
     /* Matching is not unambiguous.  The alternative digits could be like
        I, II, III, ... and the first one is a substring of the second
        and third.  Therefore we must keep on searching until we found
index 9dd89a581fe4e1f4b03c3c42790dd320f71e30b0..de763e00e0414f3fdd751ffed4b1093e235eec1a 100644 (file)
@@ -54,10 +54,10 @@ asctime_internal (const struct tm *tp, char *buf, size_t buflen)
     }
 
   int n = __snprintf (buf, buflen, format,
-                     (tp->tm_wday < 0 || tp->tm_wday >= 7 ?
-                      "???" : ab_day_name (tp->tm_wday)),
-                     (tp->tm_mon < 0 || tp->tm_mon >= 12 ?
-                      "???" : ab_month_name (tp->tm_mon)),
+                     (tp->tm_wday < 0 || tp->tm_wday >= 7
+                      "???" : ab_day_name (tp->tm_wday)),
+                     (tp->tm_mon < 0 || tp->tm_mon >= 12
+                      "???" : ab_month_name (tp->tm_mon)),
                      tp->tm_mday, tp->tm_hour, tp->tm_min,
                      tp->tm_sec, 1900 + tp->tm_year);
   if (n < 0)
index 58b271eb37c5f27cbb37dbad6b83e59063b63a0e..e19b9a15dd778ab15d895fe136c667b9440ca4ff 100644 (file)
@@ -495,8 +495,8 @@ __strptime_internal (const char *rp, const char *fmt, struct tm *tmp,
                }
              else
                {
-                 if (s.decided == not &&
-                     strcmp (_NL_CURRENT (LC_TIME, D_T_FMT), HERE_D_T_FMT))
+                 if (s.decided == not
+                     && strcmp (_NL_CURRENT (LC_TIME, D_T_FMT), HERE_D_T_FMT))
                    s.decided = loc;
                  s.want_xday = 1;
                  break;
@@ -641,9 +641,9 @@ __strptime_internal (const char *rp, const char *fmt, struct tm *tmp,
                }
              else
                {
-                 if (s.decided == not &&
-                     strcmp (_NL_CURRENT (LC_TIME, T_FMT_AMPM),
-                             HERE_T_FMT_AMPM))
+                 if (s.decided == not
+                     && strcmp (_NL_CURRENT (LC_TIME, T_FMT_AMPM),
+                                HERE_T_FMT_AMPM))
                    s.decided = loc;
                  break;
                }
index 9d65b2f6869a8ae8244b0ceb30310b9a2efa839c..5dbc7fc627f9842e2cce137888d1cd8365b0c895 100644 (file)
@@ -159,9 +159,9 @@ extern int futimesat (int __fd, const char *__file,
 # define timerisset(tvp)       ((tvp)->tv_sec || (tvp)->tv_usec)
 # define timerclear(tvp)       ((tvp)->tv_sec = (tvp)->tv_usec = 0)
 # define timercmp(a, b, CMP)                                                 \
-  (((a)->tv_sec == (b)->tv_sec) ?                                            \
-   ((a)->tv_usec CMP (b)->tv_usec) :                                         \
-   ((a)->tv_sec CMP (b)->tv_sec))
+  (((a)->tv_sec == (b)->tv_sec)                                              \
+   ? ((a)->tv_usec CMP (b)->tv_usec)                                         \
+   ((a)->tv_sec CMP (b)->tv_sec))
 # define timeradd(a, b, result)                                                      \
   do {                                                                       \
     (result)->tv_sec = (a)->tv_sec + (b)->tv_sec;                            \
index 7229ed93b7b6a51faf7e33317909a5738b1aab72..13a4f484906f34a32b8e91848198a676dc4efd1d 100644 (file)
@@ -765,8 +765,8 @@ __tzfile_compute (__time64_t timer, int use_localtime,
   *leap_correct = leaps[i].change;
 
   if (timer == leaps[i].transition && /* Exactly at the transition time.  */
-      ((i == 0 && leaps[i].change > 0) ||
-       leaps[i].change > leaps[i - 1].change))
+      ((i == 0 && leaps[i].change > 0)
+       || leaps[i].change > leaps[i - 1].change))
     {
       *leap_hit = 1;
       while (i > 0