Add some spaces before '('.

This patch fixes various places where a space should have been present
before '(' in accordance with the GNU Coding Standards.  Most but not
all of the fixes in this patch are for calls to sizeof (but it's not
exhaustive regarding such calls that should be fixed).

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

	* benchtests/bench-strcpy.c (do_test): Use space before '('.
	* benchtests/bench-string.h (cmdline_process_function): Likewise.
	* benchtests/bench-strlen.c (do_test): Likewise.
	(test_main): Likewise.
	* catgets/gencat.c (read_old): Likewise.
	* elf/cache.c (load_aux_cache): Likewise.
	* iconvdata/bug-iconv8.c (do_test): Likewise.
	* math/test-tgmath-ret.c (do_test): Likewise.
	* nis/nis_call.c (rec_dirsearch): Likewise.
	* nis/nis_findserv.c (__nis_findfastest_with_timeout): Likewise.
	* nptl/tst-audit-threads.c (do_test): Likewise.
	* nptl/tst-cancel4-common.h (set_socket_buffer): Likewise.
	* nss/nss_test1.c (init): Likewise.
	* nss/test-netdb.c (test_hosts): Likewise.
	* posix/execvpe.c (maybe_script_execute): Likewise.
	* stdio-common/tst-fmemopen4.c (do_test): Likewise.
	* stdio-common/tst-printf.c (do_test): Likewise.
	* stdio-common/vfscanf-internal.c (__vfscanf_internal): Likewise.
	* stdlib/fmtmsg.c (NKEYWORDS): Likewise.
	* stdlib/qsort.c (STACK_SIZE): Likewise.
	* stdlib/test-canon.c (do_test): Likewise.
	* stdlib/tst-swapcontext1.c (do_test): Likewise.
	* string/memcmp.c (OPSIZ): Likewise.
	* string/test-strcpy.c (do_test): Likewise.
	(do_random_tests): Likewise.
	* string/test-strlen.c (do_test): Likewise.
	(test_main): Likewise.
	* string/test-strrchr.c (do_test): Likewise.
	(do_random_tests): Likewise.
	* string/tester.c (test_memrchr): Likewise.
	(test_memchr): Likewise.
	* sysdeps/generic/memcopy.h (OPSIZ): Likewise.
	* sysdeps/generic/unwind-dw2.c (execute_stack_op): Likewise.
	* sysdeps/generic/unwind-pe.h (read_sleb128): Likewise.
	(read_encoded_value_with_base): Likewise.
	* sysdeps/hppa/dl-machine.h (elf_machine_runtime_setup): Likewise.
	* sysdeps/hppa/fpu/feupdateenv.c (__feupdateenv): Likewise.
	* sysdeps/ia64/fpu/sfp-machine.h (TI_BITS): Likewise.
	* sysdeps/mach/hurd/spawni.c (__spawni): Likewise.
	* sysdeps/posix/spawni.c (maybe_script_execute): Likewise.
	* sysdeps/powerpc/fpu/tst-setcontext-fpscr.c (query_auxv):
	Likewise.
	* sysdeps/unix/sysv/linux/aarch64/bits/procfs.h (ELF_NGREG):
	Likewise.
	* sysdeps/unix/sysv/linux/arm/bits/procfs.h (ELF_NGREG): Likewise.
	* sysdeps/unix/sysv/linux/arm/ioperm.c (init_iosys): Likewise.
	* sysdeps/unix/sysv/linux/csky/bits/procfs.h (ELF_NGREG):
	Likewise.
	* sysdeps/unix/sysv/linux/m68k/bits/procfs.h (ELF_NGREG):
	Likewise.
	* sysdeps/unix/sysv/linux/nios2/bits/procfs.h (ELF_NGREG):
	Likewise.
	* sysdeps/unix/sysv/linux/spawni.c (maybe_script_execute):
	Likewise.
	* sysdeps/unix/sysv/linux/x86/bits/procfs.h (ELF_NGREG): Likewise.
	* sysdeps/unix/sysv/linux/x86/bits/sigcontext.h
	(FP_XSTATE_MAGIC2_SIZE): Likewise.
	* sysdeps/x86/fpu/sfp-machine.h (TI_BITS): Likewise.
	* time/test_time.c (main): Likewise.
This commit is contained in:
Joseph Myers 2019-02-27 13:55:45 +00:00
parent 457208b1e9
commit c4f50205e1
47 changed files with 138 additions and 75 deletions

View File

@ -1,3 +1,65 @@
2019-02-27 Joseph Myers <joseph@codesourcery.com>
* benchtests/bench-strcpy.c (do_test): Use space before '('.
* benchtests/bench-string.h (cmdline_process_function): Likewise.
* benchtests/bench-strlen.c (do_test): Likewise.
(test_main): Likewise.
* catgets/gencat.c (read_old): Likewise.
* elf/cache.c (load_aux_cache): Likewise.
* iconvdata/bug-iconv8.c (do_test): Likewise.
* math/test-tgmath-ret.c (do_test): Likewise.
* nis/nis_call.c (rec_dirsearch): Likewise.
* nis/nis_findserv.c (__nis_findfastest_with_timeout): Likewise.
* nptl/tst-audit-threads.c (do_test): Likewise.
* nptl/tst-cancel4-common.h (set_socket_buffer): Likewise.
* nss/nss_test1.c (init): Likewise.
* nss/test-netdb.c (test_hosts): Likewise.
* posix/execvpe.c (maybe_script_execute): Likewise.
* stdio-common/tst-fmemopen4.c (do_test): Likewise.
* stdio-common/tst-printf.c (do_test): Likewise.
* stdio-common/vfscanf-internal.c (__vfscanf_internal): Likewise.
* stdlib/fmtmsg.c (NKEYWORDS): Likewise.
* stdlib/qsort.c (STACK_SIZE): Likewise.
* stdlib/test-canon.c (do_test): Likewise.
* stdlib/tst-swapcontext1.c (do_test): Likewise.
* string/memcmp.c (OPSIZ): Likewise.
* string/test-strcpy.c (do_test): Likewise.
(do_random_tests): Likewise.
* string/test-strlen.c (do_test): Likewise.
(test_main): Likewise.
* string/test-strrchr.c (do_test): Likewise.
(do_random_tests): Likewise.
* string/tester.c (test_memrchr): Likewise.
(test_memchr): Likewise.
* sysdeps/generic/memcopy.h (OPSIZ): Likewise.
* sysdeps/generic/unwind-dw2.c (execute_stack_op): Likewise.
* sysdeps/generic/unwind-pe.h (read_sleb128): Likewise.
(read_encoded_value_with_base): Likewise.
* sysdeps/hppa/dl-machine.h (elf_machine_runtime_setup): Likewise.
* sysdeps/hppa/fpu/feupdateenv.c (__feupdateenv): Likewise.
* sysdeps/ia64/fpu/sfp-machine.h (TI_BITS): Likewise.
* sysdeps/mach/hurd/spawni.c (__spawni): Likewise.
* sysdeps/posix/spawni.c (maybe_script_execute): Likewise.
* sysdeps/powerpc/fpu/tst-setcontext-fpscr.c (query_auxv):
Likewise.
* sysdeps/unix/sysv/linux/aarch64/bits/procfs.h (ELF_NGREG):
Likewise.
* sysdeps/unix/sysv/linux/arm/bits/procfs.h (ELF_NGREG): Likewise.
* sysdeps/unix/sysv/linux/arm/ioperm.c (init_iosys): Likewise.
* sysdeps/unix/sysv/linux/csky/bits/procfs.h (ELF_NGREG):
Likewise.
* sysdeps/unix/sysv/linux/m68k/bits/procfs.h (ELF_NGREG):
Likewise.
* sysdeps/unix/sysv/linux/nios2/bits/procfs.h (ELF_NGREG):
Likewise.
* sysdeps/unix/sysv/linux/spawni.c (maybe_script_execute):
Likewise.
* sysdeps/unix/sysv/linux/x86/bits/procfs.h (ELF_NGREG): Likewise.
* sysdeps/unix/sysv/linux/x86/bits/sigcontext.h
(FP_XSTATE_MAGIC2_SIZE): Likewise.
* sysdeps/x86/fpu/sfp-machine.h (TI_BITS): Likewise.
* time/test_time.c (main): Likewise.
2019-02-27 Adhemerval Zanella <adhemerval.zanella@linaro.org>
* wcsmbs/wcsnlen.c (__wcsnlen): Rewrite using wmemchr.

View File

@ -102,11 +102,11 @@ do_test (size_t align1, size_t align2, size_t len, int max_char)
but in wchar_ts, in bytes it will equal to align * (sizeof (wchar_t))
len for wcschr here isn't in bytes but it's number of wchar_t symbols. */
align1 &= 7;
if ((align1 + len) * sizeof(CHAR) >= page_size)
if ((align1 + len) * sizeof (CHAR) >= page_size)
return;
align2 &= 7;
if ((align2 + len) * sizeof(CHAR) >= page_size)
if ((align2 + len) * sizeof (CHAR) >= page_size)
return;
s1 = (CHAR *) (buf1) + align1;
@ -116,7 +116,8 @@ do_test (size_t align1, size_t align2, size_t len, int max_char)
s1[i] = 32 + 23 * i % (max_char - 32);
s1[len] = 0;
printf ("Length %4zd, alignments in bytes %2zd/%2zd:", len, align1 * sizeof(CHAR), align2 * sizeof(CHAR));
printf ("Length %4zd, alignments in bytes %2zd/%2zd:", len,
align1 * sizeof (CHAR), align2 * sizeof (CHAR));
FOR_EACH_IMPL (impl, 0)
do_one_test (impl, s2, s1, len);

View File

@ -156,7 +156,7 @@ cmdline_process_function (int c)
case OPT_RANDOM:
{
int fdr = open ("/dev/urandom", O_RDONLY);
if (fdr < 0 || read (fdr, &seed, sizeof(seed)) != sizeof (seed))
if (fdr < 0 || read (fdr, &seed, sizeof (seed)) != sizeof (seed))
seed = time (NULL);
if (fdr >= 0)
close (fdr);

View File

@ -75,7 +75,7 @@ do_test (json_ctx_t *json_ctx, size_t align, size_t len)
size_t i;
align &= 63;
if (align + sizeof(CHAR) * len >= page_size)
if (align + sizeof (CHAR) * len >= page_size)
return;
json_element_object_begin (json_ctx);
@ -127,16 +127,16 @@ test_main (void)
for (i = 1; i < 8; ++i)
{
do_test (&json_ctx, sizeof(CHAR) * i, i);
do_test (&json_ctx, sizeof (CHAR) * i, i);
do_test (&json_ctx, 0, i);
}
for (i = 2; i <= 12; ++i)
{
do_test (&json_ctx, 0, 1 << i);
do_test (&json_ctx, sizeof(CHAR) * 7, 1 << i);
do_test (&json_ctx, sizeof(CHAR) * i, 1 << i);
do_test (&json_ctx, sizeof(CHAR) * i, (size_t)((1 << i) / 1.5));
do_test (&json_ctx, sizeof (CHAR) * 7, 1 << i);
do_test (&json_ctx, sizeof (CHAR) * i, 1 << i);
do_test (&json_ctx, sizeof (CHAR) * i, (size_t)((1 << i) / 1.5));
}
json_array_end (&json_ctx);

View File

@ -1270,7 +1270,7 @@ read_old (struct catalog *catalog, const char *file_name)
Insert it at the right position. */
struct message_list *newp;
newp = (struct message_list *) xmalloc (sizeof(*newp));
newp = (struct message_list *) xmalloc (sizeof (*newp));
newp->number = old_cat_obj.name_ptr[cnt * 3 + 1];
newp->message =
&old_cat_obj.strings[old_cat_obj.name_ptr[cnt * 3 + 2]];

View File

@ -712,8 +712,8 @@ 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_size != (sizeof (struct aux_cache_file)
+ aux_cache->nlibs * sizeof (struct aux_cache_file_entry)
+ aux_cache->len_strings))
{
close (fd);

View File

@ -16,9 +16,9 @@ do_test (void)
size_t ret;
inbuf = in;
inbytesleft = sizeof(in) - 1;
inbytesleft = sizeof (in) - 1;
outbuf = out;
outbytesleft = sizeof(out);
outbytesleft = sizeof (out);
cd = iconv_open("utf-8", "cp932");
ret = iconv(cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft);

View File

@ -84,7 +84,7 @@ do_test (void)
check_return_fromfpx ();
check_return_ufromfpx ();
printf ("%Zd\n", sizeof(carg (lx)));
printf ("%Zd\n", sizeof (carg (lx)));
return errors != 0;
}

View File

@ -503,7 +503,7 @@ rec_dirsearch (const_nis_name name, directory_obj *dir, nis_error *status)
return dir;
}
nis_free_directory (dir);
obj = calloc (1, sizeof(directory_obj));
obj = calloc (1, sizeof (directory_obj));
if (obj == NULL)
{
__free_fdresult (fd_res);

View File

@ -127,7 +127,7 @@ __nis_findfastest_with_timeout (dir_binding *bind,
}
memcpy ((char *) &pings[pings_count].sin, (char *) &sin,
sizeof (sin));
memcpy ((char *)&saved_sin, (char *)&sin, sizeof(sin));
memcpy ((char *)&saved_sin, (char *)&sin, sizeof (sin));
pings[pings_count].xid = xid_seed + pings_count;
pings[pings_count].server_nr = i;
pings[pings_count].server_ep = j;

View File

@ -77,7 +77,7 @@ do_test (void)
/* Used to synchronize all the threads after calling each retNumN. */
xpthread_barrier_init (&barrier, NULL, num_threads);
threads = (pthread_t *) xcalloc (num_threads, sizeof(pthread_t));
threads = (pthread_t *) xcalloc (num_threads, sizeof (pthread_t));
for (i = 0; i < num_threads; i++)
threads[i] = xpthread_create(NULL, thread_main, NULL);

View File

@ -68,10 +68,10 @@ static void
set_socket_buffer (int s)
{
int val = 1;
socklen_t len = sizeof(val);
socklen_t len = sizeof (val);
TEST_VERIFY_EXIT (setsockopt (s, SOL_SOCKET, SO_SNDBUF, &val,
sizeof(val)) == 0);
sizeof (val)) == 0);
TEST_VERIFY_EXIT (getsockopt (s, SOL_SOCKET, SO_SNDBUF, &val, &len) == 0);
TEST_VERIFY_EXIT (val < WRITE_BUFFER_SIZE);
}

View File

@ -81,7 +81,7 @@ init(void)
return;
if (NAME(init_hook))
{
memset (&t, 0, sizeof(t));
memset (&t, 0, sizeof (t));
NAME(init_hook)(&t);
if (t.pwd_table)

View File

@ -192,7 +192,7 @@ test_hosts (void)
}
ip.s_addr = htonl (INADDR_LOOPBACK);
hptr1 = gethostbyaddr ((char *) &ip, sizeof(ip), AF_INET);
hptr1 = gethostbyaddr ((char *) &ip, sizeof (ip), AF_INET);
if (hptr1 != NULL)
{
printf ("official name of 127.0.0.1: %s\n", hptr1->h_name);

View File

@ -59,7 +59,7 @@ maybe_script_execute (const char *file, char *const argv[], char *const envp[])
new_argv[0] = (char *) _PATH_BSHELL;
new_argv[1] = (char *) file;
if (argc > 1)
memcpy (new_argv + 2, argv + 1, argc * sizeof(char *));
memcpy (new_argv + 2, argv + 1, argc * sizeof (char *));
else
new_argv[2] = NULL;

View File

@ -40,14 +40,14 @@ do_test (void)
size_t r = fwrite (test, sizeof (char), sizeof (test), stream);
if (r != sizeof (test))
{
printf ("error: fwrite returned %zu, expected %zu\n", r, sizeof(test));
printf ("error: fwrite returned %zu, expected %zu\n", r, sizeof (test));
return 1;
}
r = ftell (stream);
if (r != sizeof (test))
{
printf ("error: ftell return %zu, expected %zu\n", r, sizeof(test));
printf ("error: ftell return %zu, expected %zu\n", r, sizeof (test));
return 1;
}
@ -60,7 +60,7 @@ do_test (void)
r = ftell (stream);
if (r != sizeof (test))
{
printf ("error: ftell return %zu, expected %zu\n", r, sizeof(test));
printf ("error: ftell return %zu, expected %zu\n", r, sizeof (test));
return 1;
}

View File

@ -173,7 +173,7 @@ I am ready for my first lesson today.";
snprintf (buf, sizeof (buf), "%30s", "foo"), (int) sizeof (buf),
buf);
printf ("snprintf (\"%%.999999u\", 10) == %d\n",
snprintf(buf2, sizeof(buf2), "%.999999u", 10));
snprintf (buf2, sizeof (buf2), "%.999999u", 10));
}
printf("%.8f\n", DBL_MAX);

View File

@ -1360,7 +1360,7 @@ __vfscanf_internal (FILE *s, const char *format, va_list argptr,
wchar_t *cp = (wchar_t *) realloc (*strptr,
((wstr
- (wchar_t *) *strptr)
* sizeof(wchar_t)));
* sizeof (wchar_t)));
if (cp != NULL)
*strptr = (char *) cp;
}
@ -2756,7 +2756,7 @@ __vfscanf_internal (FILE *s, const char *format, va_list argptr,
{
wchar_t *cp = (wchar_t *)
realloc (*strptr, ((wstr - (wchar_t *) *strptr)
* sizeof(wchar_t)));
* sizeof (wchar_t)));
if (cp != NULL)
*strptr = (char *) cp;
}

View File

@ -53,7 +53,7 @@ static const struct
{ 6, "action"},
{ 3, "tag" }
};
#define NKEYWORDS (sizeof( keywords) / sizeof (keywords[0]))
#define NKEYWORDS (sizeof (keywords) / sizeof (keywords[0]))
struct severity_info

View File

@ -55,7 +55,7 @@ typedef struct
log(MAX_THRESH)). Since total_elements has type size_t, we get as
upper bound for log (total_elements):
bits per byte (CHAR_BIT) * sizeof(size_t). */
#define STACK_SIZE (CHAR_BIT * sizeof(size_t))
#define STACK_SIZE (CHAR_BIT * sizeof (size_t))
#define PUSH(low, high) ((void) ((top->lo = (low)), (top->hi = (high)), ++top))
#define POP(low, high) ((void) (--top, (low = top->lo), (high = top->hi)))
#define STACK_NOT_EMPTY (stack < top)

View File

@ -124,7 +124,7 @@ do_test (int argc, char ** argv)
int i, errors = 0;
char buf[PATH_MAX];
getcwd (cwd, sizeof(buf));
getcwd (cwd, sizeof (buf));
cwd_len = strlen (cwd);
errno = 0;
@ -204,7 +204,7 @@ do_test (int argc, char ** argv)
free (result2);
}
getcwd (buf, sizeof(buf));
getcwd (buf, sizeof (buf));
if (strcmp (buf, cwd))
{
printf ("%s: current working directory changed from %s to %s\n",

View File

@ -80,14 +80,14 @@ do_test (void)
if (getcontext(&uctx_func1) == -1)
handle_error("getcontext");
uctx_func1.uc_stack.ss_sp = func1_stack;
uctx_func1.uc_stack.ss_size = sizeof(func1_stack);
uctx_func1.uc_stack.ss_size = sizeof (func1_stack);
uctx_func1.uc_link = &uctx_main;
makecontext(&uctx_func1, func1, 0);
if (getcontext(&uctx_func2) == -1)
handle_error("getcontext");
uctx_func2.uc_stack.ss_sp = func2_stack;
uctx_func2.uc_stack.ss_size = sizeof(func2_stack);
uctx_func2.uc_stack.ss_size = sizeof (func2_stack);
uctx_func2.uc_link = &uctx_func1;
makecontext(&uctx_func2, func2, 0);

View File

@ -47,7 +47,7 @@
This should normally be the biggest type supported by a single load
and store. Must be an unsigned type. */
# define op_t unsigned long int
# define OPSIZ (sizeof(op_t))
# define OPSIZ (sizeof (op_t))
/* Threshold value for when to enter the unrolled loops. */
# define OP_T_THRES 16

View File

@ -103,11 +103,11 @@ do_test (size_t align1, size_t align2, size_t len, int max_char)
but in wchar_ts, in bytes it will equal to align * (sizeof (wchar_t))
len for wcschr here isn't in bytes but it's number of wchar_t symbols. */
align1 &= 7;
if ((align1 + len) * sizeof(CHAR) >= page_size)
if ((align1 + len) * sizeof (CHAR) >= page_size)
return;
align2 &= 7;
if ((align2 + len) * sizeof(CHAR) >= page_size)
if ((align2 + len) * sizeof (CHAR) >= page_size)
return;
s1 = (CHAR *) (buf1) + align1;
@ -137,9 +137,9 @@ do_random_tests (void)
0 to 63 since some assembly implementations have separate
prolog for alignments more 48. */
align1 = random () & (63 / sizeof(CHAR));
align1 = random () & (63 / sizeof (CHAR));
if (random () & 1)
align2 = random () & (63 / sizeof(CHAR));
align2 = random () & (63 / sizeof (CHAR));
else
align2 = align1 + (random () & 24);
len = random () & 511;

View File

@ -80,7 +80,7 @@ do_test (size_t align, size_t len)
size_t i;
align &= 63;
if (align + sizeof(CHAR) * len >= page_size)
if (align + sizeof (CHAR) * len >= page_size)
return;
CHAR *buf = (CHAR *) (buf1);
@ -97,7 +97,7 @@ static void
do_random_tests (void)
{
size_t i, j, n, align, len;
CHAR *p = (CHAR *) (buf1 + page_size - 512 * sizeof(CHAR));
CHAR *p = (CHAR *) (buf1 + page_size - 512 * sizeof (CHAR));
for (n = 0; n < ITERATIONS; n++)
{
@ -148,16 +148,16 @@ test_main (void)
for (i = 1; i < 8; ++i)
{
do_test (sizeof(CHAR) * i, i);
do_test (sizeof (CHAR) * i, i);
do_test (0, i);
}
for (i = 2; i <= 12; ++i)
{
do_test (0, 1 << i);
do_test (sizeof(CHAR) * 7, 1 << i);
do_test (sizeof(CHAR) * i, 1 << i);
do_test (sizeof(CHAR) * i, (size_t)((1 << i) / 1.5));
do_test (sizeof (CHAR) * 7, 1 << i);
do_test (sizeof (CHAR) * i, 1 << i);
do_test (sizeof (CHAR) * i, (size_t)((1 << i) / 1.5));
}
do_random_tests ();

View File

@ -86,7 +86,7 @@ do_test (size_t align, size_t pos, size_t len, int seek_char, int max_char)
CHAR *buf = (CHAR *) buf1;
align &= 7;
if ( (align + len) * sizeof(CHAR) >= page_size)
if ( (align + len) * sizeof (CHAR) >= page_size)
return;
for (i = 0; i < len; ++i)
@ -125,7 +125,7 @@ do_random_tests (void)
for (n = 0; n < ITERATIONS; n++)
{
align = random () & (63 / sizeof(CHAR));
align = random () & (63 / sizeof (CHAR));
/* For wcsrchr: align here means align not in bytes, but in wchar_ts,
in bytes it will equal to align * (sizeof (wchar_t)).
For strrchr we need to check all alignments from 0 to 63 since

View File

@ -811,11 +811,11 @@ test_memrchr (void)
bugs due to unrolled loops (assuming unrolling is limited to no
more than 128 byte chunks: */
{
char buf[128 + sizeof(long)];
char buf[128 + sizeof (long)];
long align, len, i, pos, n = 9;
for (align = 0; align < (long) sizeof(long); ++align) {
for (len = 0; len < (long) (sizeof(buf) - align); ++len) {
for (align = 0; align < (long) sizeof (long); ++align) {
for (len = 0; len < (long) (sizeof (buf) - align); ++len) {
for (i = 0; i < len; ++i)
buf[align + i] = 'x'; /* don't depend on memset... */
@ -1230,11 +1230,11 @@ test_memchr (void)
bugs due to unrolled loops (assuming unrolling is limited to no
more than 128 byte chunks: */
{
char buf[128 + sizeof(long)];
char buf[128 + sizeof (long)];
long align, len, i, pos;
for (align = 0; align < (long) sizeof(long); ++align) {
for (len = 0; len < (long) (sizeof(buf) - align); ++len) {
for (align = 0; align < (long) sizeof (long); ++align) {
for (len = 0; len < (long) (sizeof (buf) - align); ++len) {
for (i = 0; i < len; ++i) {
buf[align + i] = 'x'; /* don't depend on memset... */
}

View File

@ -60,7 +60,7 @@
This should normally be the biggest type supported by a single load
and store. */
#define op_t unsigned long int
#define OPSIZ (sizeof(op_t))
#define OPSIZ (sizeof (op_t))
/* Type to use for unaligned operations. */
typedef unsigned char byte;

View File

@ -710,7 +710,7 @@ execute_stack_op (const unsigned char *op_ptr, const unsigned char *op_end,
}
/* Most things push a result value. */
if ((size_t) stack_elt >= sizeof(stack)/sizeof(*stack))
if ((size_t) stack_elt >= sizeof (stack) / sizeof (*stack))
abort ();
stack[stack_elt++] = result;
no_push:;

View File

@ -183,7 +183,7 @@ read_sleb128 (const unsigned char *p, _Unwind_Sword *val)
while (byte & 0x80);
/* Sign-extend a negative value. */
if (shift < 8 * sizeof(result) && (byte & 0x40) != 0)
if (shift < 8 * sizeof (result) && (byte & 0x40) != 0)
result |= -(1L << shift);
*val = (_Unwind_Sword) result;
@ -215,7 +215,7 @@ read_encoded_value_with_base (unsigned char encoding, _Unwind_Ptr base,
if (encoding == DW_EH_PE_aligned)
{
_Unwind_Internal_Ptr a = (_Unwind_Internal_Ptr) p;
a = (a + sizeof (void *) - 1) & - sizeof(void *);
a = (a + sizeof (void *) - 1) & - sizeof (void *);
result = *(_Unwind_Internal_Ptr *) a;
p = (const unsigned char *) (a + sizeof (void *));
}

View File

@ -166,7 +166,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
/* FIXME: Search for the got, but backwards through the relocs, technically we should
find it on the first try. However, assuming the relocs got out of order the
routine is made a bit more robust by searching them all in case of failure. */
for (iplt = (end_jmprel - sizeof(Elf32_Rela)); iplt >= jmprel; iplt -= sizeof (Elf32_Rela))
for (iplt = (end_jmprel - sizeof (Elf32_Rela)); iplt >= jmprel; iplt -= sizeof (Elf32_Rela))
{
reloc = (const Elf32_Rela *) iplt;

View File

@ -33,7 +33,7 @@ __feupdateenv (const fenv_t *envp)
/* Given environment with exception flags not cleared. */
if ((envp != FE_DFL_ENV) && (envp != FE_NOMASK_ENV))
{
memcpy(&temp, envp, sizeof(fenv_t));
memcpy(&temp, envp, sizeof (fenv_t));
temp.__status_word |= s.sw[0] & (FE_ALL_EXCEPT << 27);
}

View File

@ -6,7 +6,7 @@
typedef int TItype __attribute__ ((mode (TI)));
typedef unsigned int UTItype __attribute__ ((mode (TI)));
#define TI_BITS (__CHAR_BIT__ * (int)sizeof(TItype))
#define TI_BITS (__CHAR_BIT__ * (int) sizeof (TItype))
/* The type of the result of a floating point comparison. This must
match `__libgcc_cmp_return__' in GCC for the target. */

View File

@ -515,7 +515,7 @@ __spawni (pid_t *pid, const char *file,
if (dtable_cells[i] != NULL) \
_hurd_port_move (dtable_cells[i], &new_##x[i], &x[i]); \
else \
memset(&new_##x[i], 0, sizeof(new_##x[i])); \
memset (&new_##x[i], 0, sizeof (new_##x[i])); \
memset (&new_##x[dtablesize], 0, (newfd + 1 - dtablesize) * sizeof (x[0])); \
x = new_##x; } while (0)

View File

@ -72,7 +72,7 @@ maybe_script_execute (struct posix_spawn_args *args)
new_argv[0] = (char *) _PATH_BSHELL;
new_argv[1] = (char *) args->file;
if (argc > 1)
memcpy (new_argv + 2, argv + 1, argc * sizeof(char *));
memcpy (new_argv + 2, argv + 1, argc * sizeof (char *));
else
new_argv[2] = NULL;

View File

@ -63,7 +63,7 @@ ElfW(Addr) query_auxv(int type)
do
{
fread(&auxv_struct, sizeof(ElfW(auxv_t)), 1, auxv_f);
fread (&auxv_struct, sizeof (ElfW(auxv_t)), 1, auxv_f);
auxv[i] = auxv_struct;
i++;
} while(auxv_struct.a_type != AT_NULL);

View File

@ -28,7 +28,7 @@ typedef __uint64_t elf_greg_t;
pt_regs' directly in the typedef, but tradition says that
the register set is an array, which does have some peculiar
semantics, so leave it that way. */
#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t))
#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof (elf_greg_t))
typedef elf_greg_t elf_gregset_t[ELF_NGREG];
/* Register set for the floating-point registers. */

View File

@ -27,7 +27,7 @@ typedef unsigned long elf_greg_t;
user_regs' directly in the typedef, but tradition says that
the register set is an array, which does have some peculiar
semantics, so leave it that way. */
#define ELF_NGREG (sizeof (struct user_regs) / sizeof(elf_greg_t))
#define ELF_NGREG (sizeof (struct user_regs) / sizeof (elf_greg_t))
typedef elf_greg_t elf_gregset_t[ELF_NGREG];
/* Register set for the floating-point registers. */

View File

@ -65,7 +65,7 @@ init_iosys (void)
{
static int iobase_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_BASE };
static int ioshift_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_SHIFT };
size_t len = sizeof(io.base);
size_t len = sizeof (io.base);
if (! __sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)
&& ! __sysctl (ioshift_name, 3, &io.shift, &len, NULL, 0))

View File

@ -27,7 +27,7 @@ typedef unsigned long elf_greg_t;
user_regs' directly in the typedef, but tradition says that
the register set is an array, which does have some peculiar
semantics, so leave it that way. */
#define ELF_NGREG (sizeof (struct user_regs) / sizeof(elf_greg_t))
#define ELF_NGREG (sizeof (struct user_regs) / sizeof (elf_greg_t))
typedef elf_greg_t elf_gregset_t[ELF_NGREG];
/* Register set for the floating-point registers. */

View File

@ -27,7 +27,7 @@ typedef unsigned long elf_greg_t;
user_regs_struct' directly in the typedef, but tradition says that
the register set is an array, which does have some peculiar
semantics, so leave it that way. */
#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t))
#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof (elf_greg_t))
typedef elf_greg_t elf_gregset_t[ELF_NGREG];
/* Register set for the floating-point registers. */

View File

@ -27,7 +27,7 @@ typedef unsigned long elf_greg_t;
user_regs' directly in the typedef, but tradition says that
the register set is an array, which does have some peculiar
semantics, so leave it that way. */
#define ELF_NGREG (sizeof (struct user_regs) / sizeof(elf_greg_t))
#define ELF_NGREG (sizeof (struct user_regs) / sizeof (elf_greg_t))
typedef elf_greg_t elf_gregset_t[ELF_NGREG];
/* Register set for the floating-point registers. */

View File

@ -105,7 +105,7 @@ maybe_script_execute (struct posix_spawn_args *args)
new_argv[0] = (char *) _PATH_BSHELL;
new_argv[1] = (char *) args->file;
if (argc > 1)
memcpy (new_argv + 2, argv + 1, argc * sizeof(char *));
memcpy (new_argv + 2, argv + 1, argc * sizeof (char *));
else
new_argv[2] = NULL;

View File

@ -31,7 +31,7 @@ typedef unsigned long elf_greg_t;
user_regs_struct' directly in the typedef, but tradition says that
the register set is an array, which does have some peculiar
semantics, so leave it that way. */
#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t))
#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof (elf_greg_t))
typedef elf_greg_t elf_gregset_t[ELF_NGREG];
#ifndef __x86_64__

View File

@ -26,7 +26,7 @@
#define FP_XSTATE_MAGIC1 0x46505853U
#define FP_XSTATE_MAGIC2 0x46505845U
#define FP_XSTATE_MAGIC2_SIZE sizeof(FP_XSTATE_MAGIC2)
#define FP_XSTATE_MAGIC2_SIZE sizeof (FP_XSTATE_MAGIC2)
struct _fpx_sw_bytes
{

View File

@ -15,7 +15,7 @@ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
typedef int TItype __attribute__ ((mode (TI)));
typedef unsigned int UTItype __attribute__ ((mode (TI)));
# define TI_BITS (__CHAR_BIT__ * (int)sizeof(TItype))
# define TI_BITS (__CHAR_BIT__ * (int) sizeof (TItype))
# define _FP_MUL_MEAT_Q(R,X,Y) \
_FP_MUL_MEAT_2_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm)

View File

@ -67,7 +67,7 @@ main (int argc, char **argv)
puts("localtime() failed.");
lose = 1;
}
else if (strftime(buf, sizeof(buf), "%a %b %d %X %Z %Y", tp) == 0)
else if (strftime (buf, sizeof (buf), "%a %b %d %X %Z %Y", tp) == 0)
{
puts("strftime() failed.");
lose = 1;