summaryrefslogtreecommitdiffstats
path: root/term-utils/mesg.c
diff options
context:
space:
mode:
authorSami Kerola2013-10-08 00:04:23 +0200
committerKarel Zak2013-10-08 15:47:59 +0200
commit5d324c6b94876e067876b2c924796e543a0f654e (patch)
tree337a16397507954d26be6cfd196ed71168163ccf /term-utils/mesg.c
parentdocs: improve grammar and wording of the release-schedule text (diff)
downloadkernel-qcow2-util-linux-5d324c6b94876e067876b2c924796e543a0f654e.tar.gz
kernel-qcow2-util-linux-5d324c6b94876e067876b2c924796e543a0f654e.tar.xz
kernel-qcow2-util-linux-5d324c6b94876e067876b2c924796e543a0f654e.zip
various: fix mixing declarations and code compiler warnings [smatch]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'term-utils/mesg.c')
-rw-r--r--term-utils/mesg.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/term-utils/mesg.c b/term-utils/mesg.c
index 097fb9c93..12e4e0e8c 100644
--- a/term-utils/mesg.c
+++ b/term-utils/mesg.c
@@ -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':