diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2016-11-06 12:41:25 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@herrb.eu> | 2020-07-14 15:52:35 +0200 |
commit | 17846f03629d7e2be9319a6126564c026df5167d (patch) | |
tree | a01cbdc873b9aa43221ce1d4ee467cbed18e38d9 | |
parent | 8b608fe8da3e6ec6cd4b90c5c58a739bb3713e1e (diff) |
GreetUser() doen't need to return the X display pointer.
-rw-r--r-- | greeter/greet.c | 8 | ||||
-rw-r--r-- | include/greet.h | 2 | ||||
-rw-r--r-- | xenodm/session.c | 3 |
3 files changed, 6 insertions, 7 deletions
diff --git a/greeter/greet.c b/greeter/greet.c index 16b5a37..420f679 100644 --- a/greeter/greet.c +++ b/greeter/greet.c @@ -295,21 +295,21 @@ FailedLogin (struct display *d, const char *username) _X_EXPORT greet_user_rtn GreetUser( struct display *d, - Display ** dpy, struct verify_info *verify, struct greet_info *greet) { int i; Arg arglist[2]; + Display *dpy; - *dpy = InitGreet (d); + dpy = InitGreet (d); /* * Run the setup script - note this usually will not work when * the server is grabbed, so we don't even bother trying. */ if (!d->grabServer) SetupDisplay (d); - if (!*dpy) { + if (!dpy) { LogError ("Cannot reopen display %s for greet window\n", d->name); exit (RESERVER_DISPLAY); } @@ -342,7 +342,7 @@ greet_user_rtn GreetUser( bzero (greet->password, strlen(greet->password)); } } - DeleteXloginResources (d, *dpy); + DeleteXloginResources (d, dpy); CloseGreet (d); Debug ("Greet loop finished %d\n", getpid()); /* diff --git a/include/greet.h b/include/greet.h index 81e7363..54bcca7 100644 --- a/include/greet.h +++ b/include/greet.h @@ -62,7 +62,7 @@ typedef enum { * option such as SECURE_RPC or K5AUTH. */ -extern greet_user_rtn GreetUser(struct display *, Display **, +extern greet_user_rtn GreetUser(struct display *, struct verify_info *, struct greet_info *); extern greet_user_rtn AutoLogin(struct display *, diff --git a/xenodm/session.c b/xenodm/session.c index 741e052..905d4b9 100644 --- a/xenodm/session.c +++ b/xenodm/session.c @@ -147,7 +147,6 @@ __dead void ManageSession (struct display *d) { pid_t pid = 0; - Display *dpy; greet_user_rtn greet_stat; Debug ("ManageSession %s\n", d->name); @@ -159,7 +158,7 @@ ManageSession (struct display *d) if (d->autoLogin == NULL || d->autoLogin[0] == '\0') { /* Load system default Resources */ LoadXloginResources (d); - greet_stat = GreetUser(d, &dpy, &verify, &greet); + greet_stat = GreetUser(d, &verify, &greet); } else greet_stat = AutoLogin(d, &verify, &greet); |