]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - term-utils/mesg.c
various: fix mixing declarations and code compiler warnings [smatch]
[thirdparty/util-linux.git] / term-utils / mesg.c
index 097fb9c932cea8fd198434dabee76e539c326090..12e4e0e8ca213ef8a5a1a955be7c38b5b60871fd 100644 (file)
@@ -88,11 +88,6 @@ int main(int argc, char *argv[])
        char *tty;
        int ch, verbose = FALSE;
 
-       setlocale(LC_ALL, "");
-       bindtextdomain(PACKAGE, LOCALEDIR);
-       textdomain(PACKAGE);
-       atexit(close_stdout);
-
        static const struct option longopts[] = {
                { "verbose",    no_argument,       0, 'v' },
                { "version",    no_argument,       0, 'V' },
@@ -100,6 +95,11 @@ int main(int argc, char *argv[])
                { NULL,         0, 0, 0 }
        };
 
+       setlocale(LC_ALL, "");
+       bindtextdomain(PACKAGE, LOCALEDIR);
+       textdomain(PACKAGE);
+       atexit(close_stdout);
+
        while ((ch = getopt_long(argc, argv, "vVh", longopts, NULL)) != -1)
                switch (ch) {
                case 'v':