diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2020-08-07 13:29:43 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2020-08-07 15:09:56 +0200 |
commit | e7fca6f867f441aaf54061545b297a62ce93708f (patch) | |
tree | b36ba6baec69f39ef26d2ed8502fadca721d96fb /winsup/utils/lsattr.c | |
parent | 9beb7b977162bd576da325ce8e23152e70989f78 (diff) | |
download | newlib-e7fca6f867f441aaf54061545b297a62ce93708f.zip newlib-e7fca6f867f441aaf54061545b297a62ce93708f.tar.gz newlib-e7fca6f867f441aaf54061545b297a62ce93708f.tar.bz2 |
Cygwin: utils: convert usage() to proper noreturn function throughout
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/utils/lsattr.c')
-rw-r--r-- | winsup/utils/lsattr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/utils/lsattr.c b/winsup/utils/lsattr.c index ee72043..7002280 100644 --- a/winsup/utils/lsattr.c +++ b/winsup/utils/lsattr.c @@ -180,7 +180,7 @@ print_version () strrchr (__DATE__, ' ') + 1); } -static void +static void __attribute__ ((__noreturn__)) usage (FILE *stream) { fprintf (stream, "Usage: %s [-RVadhln] [file]...\n", @@ -221,6 +221,7 @@ usage (FILE *stream) " 'C', 'Casesensitive': directory is handled case sensitive\n" " (Windows 10 1803 or later, local NTFS only,\n" " WSL must be installed)\n"); + exit (stream == stdout ? 0 : 1); } int @@ -254,7 +255,7 @@ main (int argc, char **argv) case 'h': default: usage (c == 'h' ? stdout : stderr); - return 1; + break; } } if (optind > argc - 1) |