Replace tty variable in chk_timeout

The tty variable is a char pointer equal to dev, it's pointee does not
change during the function, nor does the pointer itself change, it's
always simply equal to the argument dev, therefore, this pointer is, ...
pointless (ba dum tss!)
This commit is contained in:
Petar Kapris 2020-12-20 11:14:24 +01:00
parent 9201509738
commit be15d1fc76

View file

@ -740,7 +740,6 @@ int session;
char ttymatch = 0;
char usermatch = 0;
char groupmatch = 0;
char *tty = dev;
char **p;
int disc;
@ -757,13 +756,13 @@ int session;
}
#ifdef DEBUG
syslog(LOG_DEBUG, "Checking user %s group %s tty %s.", user, gr->gr_name, tty);
syslog(LOG_DEBUG, "Checking user %s group %s tty %s.", user, gr->gr_name, dev);
#endif
/* Check to see if current user matches any entry based on tty/user/group */
while (config[configline]) {
timematch = chktimes(config[configline]->times);
ttymatch = chkmatch(tty, config[configline]->ttys);
ttymatch = chkmatch(dev, config[configline]->ttys);
usermatch = chkmatch(user, config[configline]->users);
groupmatch = chkmatch(gr->gr_name, config[configline]->groups);
/* If the primary group doesn't match this entry, check secondaries */