* libmisc/ttytype.c: Add brackets and parenthesis.
* libmisc/ttytype.c: Avoid assignments in comparisons.
This commit is contained in:
parent
2ce68e8aec
commit
f3bea401e9
@ -1,3 +1,8 @@
|
||||
2009-04-20 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* libmisc/ttytype.c: Add brackets and parenthesis.
|
||||
* libmisc/ttytype.c: Avoid assignments in comparisons.
|
||||
|
||||
2009-04-20 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* lib/pwio.c, lib/shadowio.c, lib/groupio.c, lib/sgroupio.c: Fill
|
||||
|
@ -50,12 +50,16 @@ void ttytype (const char *line)
|
||||
char type[BUFSIZ];
|
||||
char port[BUFSIZ];
|
||||
|
||||
if (getenv ("TERM"))
|
||||
if (getenv ("TERM") != NULL) {
|
||||
return;
|
||||
if ((typefile = getdef_str ("TTYTYPE_FILE")) == NULL)
|
||||
}
|
||||
typefile = getdef_str ("TTYTYPE_FILE");
|
||||
if (NULL == typefile) {
|
||||
return;
|
||||
if (access (typefile, F_OK) != 0)
|
||||
}
|
||||
if (access (typefile, F_OK) != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
fp = fopen (typefile, "r");
|
||||
if (NULL == fp) {
|
||||
|
Loading…
Reference in New Issue
Block a user