mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Simplify the code a little.
Submitted by: rppokala Sponsored by: Netflix
This commit is contained in:
parent
05dad2b781
commit
62fd382c43
1 changed files with 1 additions and 3 deletions
|
|
@ -110,9 +110,7 @@ auto_exists_status(const char *ty_name)
|
|||
asprintf(&dev, "%s", ty_name);
|
||||
else
|
||||
asprintf(&dev, "/dev/%s", ty_name);
|
||||
if (dev == NULL)
|
||||
return 0;
|
||||
if (stat(dev, &sb) == 0)
|
||||
if (dev != NULL && stat(dev, &sb) == 0)
|
||||
rv = TTY_ON;
|
||||
free(dev);
|
||||
return (rv);
|
||||
|
|
|
|||
Loading…
Reference in a new issue