FreeBSD Bugzilla – Attachment 215500 Details for
Bug 241906
`locale -k` with an invalid keyword exits with 0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch for locale
PR241906.diff (text/plain), 1.10 KB, created by
Akos Somfai
on 2020-06-12 21:39:24 UTC
(
hide
)
Description:
proposed patch for locale
Filename:
MIME Type:
Creator:
Akos Somfai
Created:
2020-06-12 21:39:24 UTC
Size:
1.10 KB
patch
obsolete
>Index: usr.bin/locale/locale.c >=================================================================== >--- usr.bin/locale/locale.c (revision 362074) >+++ usr.bin/locale/locale.c (working copy) >@@ -61,7 +61,7 @@ > const char *lookup_localecat(int); > char *kwval_lconv(int); > int kwval_lookup(const char *, char **, int *, int *, int *); >-void showdetails(const char *); >+int showdetails(const char *); > void showkeywordslist(char *substring); > void showlocale(void); > void usage(void); >@@ -414,7 +414,8 @@ > setlocale(LC_ALL, ""); > if (argc > 0) { > while (argc > 0) { >- showdetails(*argv); >+ if (showdetails(*argv) == 0) >+ exit(EXIT_FAILURE); > argv++; > argc--; > } >@@ -837,7 +838,7 @@ > * Show details about requested keyword according to '-k' and/or '-c' > * command line options specified. > */ >-void >+int > showdetails(const char *kw) > { > int type, cat, tmpval, alloc; >@@ -849,7 +850,7 @@ > * XXX: any actions? > */ > fprintf(stderr, "Unknown keyword: `%s'\n", kw); >- return; >+ return (0); > } > > if (prt_categories) { >@@ -889,6 +890,8 @@ > > if (alloc) > free(kwval); >+ >+ return (1); > } > > /*
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 241906
: 215500