avoid warning.
* io/pwd.c (main): Likewise.
* iconvdata/tst-table-from.c (main): Likewise.
* ctype/test_ctype.c (main): Likewise.
* setjmp/tst-setjmp.c (main): Likewise.
* signal/tst-signal.c (main): Likewise.
* stdlib/tst-strtol.c (main): Likewise.
* stdlib/tst-strtod.c (main): Likewise.
* stdlib/tst-strtoll.c (main): Likewise.
* stdlib/tst-xpg-basename.c (main): Likewise.
* dirent/tst-seekdir.c (main): Likewise.
* grp/testgrp.c (main): Likewise.
* inet/test_ifindex.c (main): Likewise.
* io/test-utime.c (main): Likewise.
* posix/test-vfork.c (main): Likewise.
* posix/testfnm.c (main): Likewise.
* stdio-common/temptest.c (main): Likewise.
* stdio-common/test_rdwr.c (main): Likewise.
* stdio-common/tst-fileno.c (main): Likewise.
* stdio-common/tst-sscanf.c (main): Likewise.
* stdio-common/tstscanf.c (main): Likewise.
* string/bug-strncat1.c (main): Likewise.
* string/bug-strpbrk1.c (main): Likewise.
* string/bug-strspn1.c (main): Likewise.
* string/test-ffs.c (main): Likewise.
* string/tst-inlcall.c (main): Likewise.
* string/tst-svc.c (main): Likewise.
* timezone/test-tz.c (main): Likewise.
* wctype/test_wcfuncs.c (main): Likewise.
* wctype/test_wctype.c (main): Likewise.
* stdlib/tst-random.c: Add attribute noreturn to fail.
-/* Copyright (C) 1991, 1994, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
TRYEM;
#undef TRY
- exit (lose ? EXIT_FAILURE : EXIT_SUCCESS);
+ return lose ? EXIT_FAILURE : EXIT_SUCCESS;
}
closedir (dirp);
- exit(0);
+ return 0;
}
}
}
- exit (my_passwd && my_group ? EXIT_SUCCESS : EXIT_FAILURE);
+ return my_passwd && my_group ? EXIT_SUCCESS : EXIT_FAILURE;
}
exit (1);
}
- exit (0);
+ return 0;
}
/* Test interface name <-> index conversions.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <Philip.Blundell@pobox.com>.
failures += result;
}
if_freenameindex (idx);
- exit (failures ? 1 : 0);
+ return failures ? 1 : 0;
}
free (dir);
}
- exit (dir == NULL ? EXIT_FAILURE : EXIT_SUCCESS);
+ return (dir == NULL ? EXIT_FAILURE : EXIT_SUCCESS);
}
if (tmpnam (file) == 0)
{
perror ("tmpnam");
- exit (1);
+ return 1;
}
fd = creat (file, 0666);
if (fd < 0)
{
perror ("creat");
- exit (1);
+ return 1;
}
close (fd);
{
perror ("utime");
remove (file);
- exit (1);
+ return 1;
}
if (stat (file, &st))
{
perror ("stat");
remove (file);
- exit (1);
+ return 1;
}
/* Test utime with NULL.
{
perror ("time");
remove (file);
- exit (1);
+ return 1;
}
if (utime (file, NULL))
{
perror ("utime NULL");
remove (file);
- exit (1);
+ return 1;
}
now2 = time (NULL);
{
perror ("time");
remove (file);
- exit (1);
+ return 1;
}
if (stat (file, &stnow))
{
perror ("stat");
remove (file);
- exit (1);
+ return 1;
}
remove (file);
if (st.st_mtime != ut.modtime)
{
printf ("modtime %ld != %ld\n", st.st_mtime, ut.modtime);
- exit (1);
+ return 1;
}
if (st.st_atime != ut.actime)
{
printf ("actime %ld != %ld\n", st.st_atime, ut.actime);
- exit (1);
+ return 1;
}
if (stnow.st_mtime < now1 || stnow.st_mtime > now2)
{
printf ("modtime %ld <%ld >%ld\n", st.st_mtime, now1, now2);
- exit (1);
+ return 1;
}
if (stnow.st_atime < now1 || stnow.st_atime > now2)
{
printf ("actime %ld <%ld >%ld\n", st.st_atime, now1, now2);
- exit (1);
+ return 1;
}
puts ("Test succeeded.");
- exit (0);
+ return 0;
}
gdImageDestroy (im_out);
- exit (0);
+ return 0;
}
if (waitpid (0, &status, 0) != pid
|| !WIFEXITED (status) || WEXITSTATUS (status) != NR)
exit (1);
- exit (0);
+
+ return 0;
}
void
++errors ;
}
- exit (errors != 0);
+ return errors != 0;
}
puts ("Test FAILED!");
else
puts ("Test succeeded!");
- exit (lose ? EXIT_FAILURE : EXIT_SUCCESS);
+
+ return lose ? EXIT_FAILURE : EXIT_SUCCESS;
}
}
puts ("Got a signal. Test succeeded.");
- exit (EXIT_SUCCESS);
+
+ return EXIT_SUCCESS;
}
for (i = 0; i < 500; i++)
remove (files[i]);
- exit (0);
+ return 0;
}
-/* Copyright (C) 1991, 1992, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1996,1997,1998,2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
puts ("Test succeeded.");
}
- exit (lose ? EXIT_FAILURE : EXIT_SUCCESS);
+ return lose ? EXIT_FAILURE : EXIT_SUCCESS;
}
check (const char *name, FILE *stream, int fd)
{
int sfd = fileno (stream);
- printf ("(fileno (%s) = %d) %c= %d\n", name, sfd, sfd == fd ? '=' : '!', fd);
+ printf ("(fileno (%s) = %d) %c= %d\n", name, sfd,
+ sfd == fd ? '=' : '!', fd);
return sfd != fd;
}
int
main (void)
{
- exit (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));
}
if (! tst_locale)
break;
}
- exit (result);
+
+ return result;
}
}
}
- exit (result);
+ return result;
}
const int nrnd = 50; /* length of each test sequence */
const unsigned int seed[3] = { 0x12344321U, 0xEE11DD22U, 0xFEDCBA98 };
-void fail (const char *msg, int s, int i);
+void fail (const char *msg, int s, int i) __attribute__ ((__noreturn__));
int
main (void)
status |= long_dbl ();
- exit (status ? EXIT_FAILURE : EXIT_SUCCESS);
+ return status ? EXIT_FAILURE : EXIT_SUCCESS;
}
static void
}
}
- exit (status ? EXIT_FAILURE : EXIT_SUCCESS);
+ return status ? EXIT_FAILURE : EXIT_SUCCESS;
}
static void
}
}
- exit (status ? EXIT_FAILURE : EXIT_SUCCESS);
+ return status ? EXIT_FAILURE : EXIT_SUCCESS;
}
static void
}
}
- exit (errors);
+ return errors;
}
exit (1);
}
- exit (0);
+ return 0;
}
strpbrk (b++, "");
if (b != a + 1)
- exit (1);
+ return 1;
- exit (0);
+ return 0;
}
strspn (b++, "");
if (b != a + 1)
- exit (1);
+ return 1;
- exit (0);
+ return 0;
}
int i;
auto void try (int value, int expected);
-
+
void try (int value, int expected)
{
if (ffs (value) != expected)
else
puts ("Test succeeded.");
- exit (failures);
+ return failures;
}
/* Tester for calling inline string functions.
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
char buf1[1000];
char *cp;
char ch;
-
+
cp = strcpy (buf1, "hello world");
if (strcmp ("hello world", cp++) != 0)
{
status = EXIT_FAILURE;
printf ("%d errors.\n", errors);
}
- exit (status);
+ return status;
}
for (i = 0; i < count; ++i)
puts (str[i]);
- exit (EXIT_SUCCESS);
+ return EXIT_SUCCESS;
}
if (errors == 0)
{
puts ("No errors.");
- exit (EXIT_SUCCESS);
+ return EXIT_SUCCESS;
}
else
{
printf ("%d errors.\n", errors);
- exit (EXIT_FAILURE);
+ return EXIT_FAILURE;
}
}
if (result == 0)
puts ("All test successful!");
- exit (result);
+ return result != 0;
}
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
if (result == 0)
puts ("All test successful!");
- exit (result);
+ return result;
}