From: Sami Kerola Date: Wed, 9 May 2018 20:54:22 +0000 (+0100) Subject: rev: move a global variable to local scope X-Git-Tag: v2.33-rc1~240 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=25ed963d021c3db1d8a07c0a548b595047bdeb96;p=thirdparty%2Futil-linux.git rev: move a global variable to local scope Mark also file names read-only. Signed-off-by: Sami Kerola --- diff --git a/text-utils/rev.c b/text-utils/rev.c index 84d116d8c3..13a41f633e 100644 --- a/text-utils/rev.c +++ b/text-utils/rev.c @@ -64,8 +64,6 @@ #include "c.h" #include "closestream.h" -static wchar_t *buf; - static void sig_handler(int signo __attribute__ ((__unused__))) { _exit(EXIT_SUCCESS); @@ -100,7 +98,8 @@ static void reverse_str(wchar_t *str, size_t n) int main(int argc, char *argv[]) { - char *filename = "stdin"; + char const *filename = "stdin"; + wchar_t *buf; size_t len, bufsiz = BUFSIZ; FILE *fp = stdin; int ch, rval = EXIT_SUCCESS;