* libmisc/ttytype.c: Add brackets and parenthesis.

* libmisc/ttytype.c: Avoid assignments in comparisons.
This commit is contained in:
nekral-guest 2009-04-20 11:31:05 +00:00
parent 2ce68e8aec
commit f3bea401e9
2 changed files with 12 additions and 3 deletions

View File

@ -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

View File

@ -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) {