summaryrefslogtreecommitdiffstats
path: root/term-utils/wall.c
diff options
context:
space:
mode:
authorSami Kerola2013-04-08 21:32:49 +0200
committerKarel Zak2013-04-09 12:17:20 +0200
commit3acc206d39de38f7d78008950cd030fceb125ff0 (patch)
treec66b0823e6c132d4b80f9f90133fa4e63f3f146c /term-utils/wall.c
parentbash-completion: swapon: add options and fix argument (diff)
downloadkernel-qcow2-util-linux-3acc206d39de38f7d78008950cd030fceb125ff0.tar.gz
kernel-qcow2-util-linux-3acc206d39de38f7d78008950cd030fceb125ff0.tar.xz
kernel-qcow2-util-linux-3acc206d39de38f7d78008950cd030fceb125ff0.zip
various: fix variable and function declarations [smatch scan]
disk-utils/fsck.minix.c:511:9: warning: mixing declarations and code fdisks/sfdisk.c:982:5: warning: mixing declarations and code fdisks/sfdisk.c:1254:5: warning: mixing declarations and code fdisks/sfdisk.c:1564:5: warning: mixing declarations and code lib/mbsalign.c:279:7: warning: mixing declarations and code libblkid/src/devname.c:378:17: warning: mixing declarations and code libfdisk/src/alignment.c:219:9: warning: mixing declarations and code term-utils/wall.c:111:9: warning: mixing declarations and code text-utils/col.c:418:19: warning: non-ANSI function declaration of function 'flush_blanks' text-utils/col.c:553:12: warning: non-ANSI function declaration of function 'alloc_line' text-utils/rev.c:105:9: warning: mixing declarations and code text-utils/tailf.c:245:9: warning: mixing declarations and code Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'term-utils/wall.c')
-rw-r--r--term-utils/wall.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/term-utils/wall.c b/term-utils/wall.c
index c2ac7ad12..4865ac7a1 100644
--- a/term-utils/wall.c
+++ b/term-utils/wall.c
@@ -103,11 +103,6 @@ main(int argc, char **argv) {
size_t mbufsize;
unsigned timeout = WRITE_TIME_OUT;
- setlocale(LC_ALL, "");
- bindtextdomain(PACKAGE, LOCALEDIR);
- textdomain(PACKAGE);
- atexit(close_stdout);
-
static const struct option longopts[] = {
{ "nobanner", no_argument, 0, 'n' },
{ "timeout", required_argument, 0, 't' },
@@ -116,6 +111,11 @@ 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, "nt:Vh", longopts, NULL)) != -1) {
switch (ch) {
case 'n':