@@ -106,12 +106,7 @@ int main(int argc, char **argv)
gid_t gid;
int arg;
- /* Ensure UTF-8 strings can be handled transparently */
- if (setlocale(LC_CTYPE, "") == NULL ||
- strcmp(nl_langinfo(CODESET), "UTF-8") != 0) {
- fprintf(stderr, "Failed to set locale and langinfo\n");
- exit(EXIT_FAILURE);
- }
+ (void)setlocale(LC_ALL, "");
xlog_stderr(0);
xlog_syslog(1);
@@ -55,12 +55,7 @@ main(int argc, char **argv)
FedFsStatus retval;
int fd;
- /* Ensure UTF-8 strings can be handled transparently */
- if (setlocale(LC_CTYPE, "") == NULL ||
- strcmp(nl_langinfo(CODESET), "UTF-8") != 0) {
- fprintf(stderr, "Failed to set locale and langinfo\n");
- exit(EXIT_FAILURE);
- }
+ (void)setlocale(LC_ALL, "");
/* For the libraries */
if ((progname = strrchr(argv[0], '/')) != NULL)
@@ -187,12 +187,7 @@ out:
*/
int main(int argc, char *argv[])
{
- /* Ensure UTF-8 strings can be handled transparently */
- if (setlocale(LC_CTYPE, "") == NULL ||
- strcmp(nl_langinfo(CODESET), "UTF-8") != 0) {
- fprintf(stderr, _("Failed to set locale and langinfo\n"));
- return 1;
- }
+ (void)setlocale(LC_ALL, "");
progname = basename(argv[0]);
@@ -405,12 +405,7 @@ int main(int argc, char *argv[])
char *source, *target, *text_options;
int c, mnt_err;
- /* Ensure UTF-8 strings can be handled transparently */
- if (setlocale(LC_CTYPE, "") == NULL ||
- strcmp(nl_langinfo(CODESET), "UTF-8") != 0) {
- fprintf(stderr, _("Failed to set locale and langinfo\n"));
- return 1;
- }
+ (void)setlocale(LC_ALL, "");
progname = basename(argv[0]);
@@ -99,17 +99,11 @@ main(int argc, char **argv)
int arg, exit_status;
_Bool help;
+ (void)setlocale(LC_ALL, "");
(void)umask(S_IWGRP | S_IWOTH);
exit_status = EXIT_FAILURE;
- /* Ensure UTF-8 strings can be handled transparently */
- if (setlocale(LC_CTYPE, "") == NULL ||
- strcmp(nl_langinfo(CODESET), "UTF-8") != 0) {
- fprintf(stderr, "Failed to set locale and langinfo\n");
- goto out;
- }
-
/* Set the basename */
if ((progname = strrchr(argv[0], '/')) != NULL)
progname++;
@@ -115,15 +115,9 @@ main(int argc, char **argv)
nsdb_t host;
int arg;
+ (void)setlocale(LC_ALL, "");
(void)umask(S_IRWXO);
- /* Ensure UTF-8 strings can be handled transparently */
- if (setlocale(LC_CTYPE, "") == NULL ||
- strcmp(nl_langinfo(CODESET), "UTF-8") != 0) {
- fprintf(stderr, "Failed to set locale and langinfo\n");
- exit((int)FEDFS_ERR_INVAL);
- }
-
/* Set the basename */
if ((progname = strrchr(argv[0], '/')) != NULL)
progname++;
@@ -114,15 +114,9 @@ main(int argc, char **argv)
nsdb_t host;
int arg;
+ (void)setlocale(LC_ALL, "");
(void)umask(S_IRWXO);
- /* Ensure UTF-8 strings can be handled transparently */
- if (setlocale(LC_CTYPE, "") == NULL ||
- strcmp(nl_langinfo(CODESET), "UTF-8") != 0) {
- fprintf(stderr, "Failed to set locale and langinfo\n");
- exit((int)FEDFS_ERR_INVAL);
- }
-
/* Set the basename */
if ((progname = strrchr(argv[0], '/')) != NULL)
progname++;
@@ -117,15 +117,9 @@ main(int argc, char **argv)
nsdb_t host;
int arg;
+ (void)setlocale(LC_ALL, "");
(void)umask(S_IRWXO);
- /* Ensure UTF-8 strings can be handled transparently */
- if (setlocale(LC_CTYPE, "") == NULL ||
- strcmp(nl_langinfo(CODESET), "UTF-8") != 0) {
- fprintf(stderr, "Failed to set locale and langinfo\n");
- exit((int)FEDFS_ERR_INVAL);
- }
-
/* Set the basename */
if ((progname = strrchr(argv[0], '/')) != NULL)
progname++;
@@ -113,15 +113,9 @@ main(int argc, char **argv)
nsdb_t host;
int arg;
+ (void)setlocale(LC_ALL, "");
(void)umask(S_IRWXO);
- /* Ensure UTF-8 strings can be handled transparently */
- if (setlocale(LC_CTYPE, "") == NULL ||
- strcmp(nl_langinfo(CODESET), "UTF-8") != 0) {
- fprintf(stderr, "Failed to set locale and langinfo\n");
- exit((int)FEDFS_ERR_INVAL);
- }
-
/* Set the basename */
if ((progname = strrchr(argv[0], '/')) != NULL)
progname++;
@@ -111,15 +111,9 @@ main(int argc, char **argv)
nsdb_t host;
int arg;
+ (void)setlocale(LC_ALL, "");
(void)umask(S_IRWXO);
- /* Ensure UTF-8 strings can be handled transparently */
- if (setlocale(LC_CTYPE, "") == NULL ||
- strcmp(nl_langinfo(CODESET), "UTF-8") != 0) {
- fprintf(stderr, "Failed to set locale and langinfo\n");
- exit((int)FEDFS_ERR_INVAL);
- }
-
/* Set the basename */
if ((progname = strrchr(argv[0], '/')) != NULL)
progname++;
@@ -102,15 +102,9 @@ main(int argc, char **argv)
char *nce;
int arg;
+ (void)setlocale(LC_ALL, "");
(void)umask(S_IRWXO);
- /* Ensure UTF-8 strings can be handled transparently */
- if (setlocale(LC_CTYPE, "") == NULL ||
- strcmp(nl_langinfo(CODESET), "UTF-8") != 0) {
- fprintf(stderr, "Failed to set locale and langinfo\n");
- exit((int)FEDFS_ERR_INVAL);
- }
-
/* Set the basename */
if ((progname = strrchr(argv[0], '/')) != NULL)
progname++;
@@ -110,15 +110,9 @@ main(int argc, char **argv)
nsdb_t host;
int arg;
+ (void)setlocale(LC_ALL, "");
(void)umask(S_IRWXO);
- /* Ensure UTF-8 strings can be handled transparently */
- if (setlocale(LC_CTYPE, "") == NULL ||
- strcmp(nl_langinfo(CODESET), "UTF-8") != 0) {
- fprintf(stderr, "Failed to set locale and langinfo\n");
- exit((int)FEDFS_ERR_INVAL);
- }
-
/* Set the basename */
if ((progname = strrchr(argv[0], '/')) != NULL)
progname++;
@@ -293,15 +293,9 @@ main(int argc, char **argv)
char *nce;
int arg;
+ (void)setlocale(LC_ALL, "");
(void)umask(S_IRWXO);
- /* Ensure UTF-8 strings can be handled transparently */
- if (setlocale(LC_CTYPE, "") == NULL ||
- strcmp(nl_langinfo(CODESET), "UTF-8") != 0) {
- fprintf(stderr, "Failed to set locale and langinfo\n");
- exit((int)FEDFS_ERR_INVAL);
- }
-
/* Set the basename */
if ((progname = strrchr(argv[0], '/')) != NULL)
progname++;
@@ -102,15 +102,9 @@ main(int argc, char **argv)
nsdb_t host;
int arg, i;
+ (void)setlocale(LC_ALL, "");
(void)umask(S_IRWXO);
- /* Ensure UTF-8 strings can be handled transparently */
- if (setlocale(LC_CTYPE, "") == NULL ||
- strcmp(nl_langinfo(CODESET), "UTF-8") != 0) {
- fprintf(stderr, "Failed to set locale and langinfo\n");
- exit((int)FEDFS_ERR_INVAL);
- }
-
/* Set the basename */
if ((progname = strrchr(argv[0], '/')) != NULL)
progname++;
@@ -104,15 +104,9 @@ main(int argc, char **argv)
char *nce;
int arg;
+ (void)setlocale(LC_ALL, "");
(void)umask(S_IRWXO);
- /* Ensure UTF-8 strings can be handled transparently */
- if (setlocale(LC_CTYPE, "") == NULL ||
- strcmp(nl_langinfo(CODESET), "UTF-8") != 0) {
- fprintf(stderr, "Failed to set locale and langinfo\n");
- exit((int)FEDFS_ERR_INVAL);
- }
-
/* Set the basename */
if ((progname = strrchr(argv[0], '/')) != NULL)
progname++;
@@ -256,15 +256,9 @@ main(int argc, char **argv)
int fsn_ttl, arg;
nsdb_t host;
+ (void)setlocale(LC_ALL, "");
(void)umask(S_IRWXO);
- /* Ensure UTF-8 strings can be handled transparently */
- if (setlocale(LC_CTYPE, "") == NULL ||
- strcmp(nl_langinfo(CODESET), "UTF-8") != 0) {
- fprintf(stderr, "Failed to set locale and langinfo\n");
- exit((int)FEDFS_ERR_INVAL);
- }
-
/* Set the basename */
if ((progname = strrchr(argv[0], '/')) != NULL)
progname++;
@@ -102,15 +102,9 @@ main(int argc, char **argv)
nsdb_t host;
int arg;
+ (void)setlocale(LC_ALL, "");
(void)umask(S_IRWXO);
- /* Ensure UTF-8 strings can be handled transparently */
- if (setlocale(LC_CTYPE, "") == NULL ||
- strcmp(nl_langinfo(CODESET), "UTF-8") != 0) {
- fprintf(stderr, "Failed to set locale and langinfo\n");
- exit((int)FEDFS_ERR_INVAL);
- }
-
/* Set the basename */
if ((progname = strrchr(argv[0], '/')) != NULL)
progname++;
@@ -115,15 +115,9 @@ main(int argc, char **argv)
nsdb_t host;
int arg;
+ (void)setlocale(LC_ALL, "");
(void)umask(S_IRWXO);
- /* Ensure UTF-8 strings can be handled transparently */
- if (setlocale(LC_CTYPE, "") == NULL ||
- strcmp(nl_langinfo(CODESET), "UTF-8") != 0) {
- fprintf(stderr, "Failed to set locale and langinfo\n");
- exit((int)FEDFS_ERR_INVAL);
- }
-
/* Set the basename */
if ((progname = strrchr(argv[0], '/')) != NULL)
progname++;
@@ -108,15 +108,9 @@ main(int argc, char **argv)
nsdb_t host;
int arg;
+ (void)setlocale(LC_ALL, "");
(void)umask(S_IRWXO);
- /* Ensure UTF-8 strings can be handled transparently */
- if (setlocale(LC_CTYPE, "") == NULL ||
- strcmp(nl_langinfo(CODESET), "UTF-8") != 0) {
- fprintf(stderr, "Failed to set locale and langinfo\n");
- exit((int)FEDFS_ERR_INVAL);
- }
-
/* Set the basename */
if ((progname = strrchr(argv[0], '/')) != NULL)
progname++;
@@ -184,11 +184,7 @@ main(int argc, char **argv)
exit_status = EXIT_FAILURE;
- /* Ensure UTF-8 strings can be handled transparently */
- if (setlocale(LC_CTYPE, "") == NULL)
- goto out;
- if (strcmp(nl_langinfo(CODESET), "UTF-8") != 0)
- goto out;
+ (void)setlocale(LC_ALL, "");
/* Set the basename */
if ((progname = strrchr(argv[0], '/')) != NULL)