summaryrefslogtreecommitdiff
path: root/app/xauth/xauth.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2024-04-28 10:07:03 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2024-04-28 10:07:03 +0000
commita7dfecb7c86896dabbf61dd7b724c41dcf48ef3a (patch)
treee0a1905bbbf1c23b8d3a0630324aed178be4f6f2 /app/xauth/xauth.c
parentba99632df6e3b0ede8d68acf7fc2299113c0db61 (diff)
Update to xauth 1.1.3
Diffstat (limited to 'app/xauth/xauth.c')
-rw-r--r--app/xauth/xauth.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/app/xauth/xauth.c b/app/xauth/xauth.c
index d9efda051..3855b5383 100644
--- a/app/xauth/xauth.c
+++ b/app/xauth/xauth.c
@@ -79,16 +79,15 @@ NULL };
"standard input. Commands beginning with \"n\" use numeric format.",
"",
NULL };
- const char **msg;
fprintf (stderr, "usage: %s [-options ...] [command arg ...]\n",
ProgramName);
- for (msg = prefixmsg; *msg; msg++) {
+ for (const char **msg = prefixmsg; *msg; msg++) {
fprintf (stderr, "%s\n", *msg);
}
print_help (stderr, NULL, " "); /* match prefix indentation */
fprintf (stderr, "\n");
- for (msg = suffixmsg; *msg; msg++) {
+ for (const char **msg = suffixmsg; *msg; msg++) {
fprintf (stderr, "%s\n", *msg);
}
exit (1);
@@ -101,7 +100,6 @@ NULL };
int
main(int argc, const char *argv[])
{
- int i;
const char *sourcename = defsource;
const char **arglist = defcmds;
int nargs = ndefcmds;
@@ -109,12 +107,11 @@ main(int argc, const char *argv[])
ProgramName = argv[0];
- for (i = 1; i < argc; i++) {
+ for (int i = 1; i < argc; i++) {
const char *arg = argv[i];
if (arg[0] == '-') {
- const char *flag;
- for (flag = (arg + 1); *flag; flag++) {
+ for (const char *flag = (arg + 1); *flag; flag++) {
switch (*flag) {
case 'f': /* -f authfilename */
if (++i >= argc) usage ();