tunelp: check fstat return code [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
32c67d2c58
commit
97209c2be1
|
@ -264,7 +264,8 @@ int main(int argc, char **argv)
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
err(EXIT_FAILURE, "%s", filename);
|
err(EXIT_FAILURE, "%s", filename);
|
||||||
|
|
||||||
fstat(fd, &statbuf);
|
if (fstat(fd, &statbuf))
|
||||||
|
err(EXIT_FAILURE, "%s: stat() failed", filename);
|
||||||
|
|
||||||
if (!S_ISCHR(statbuf.st_mode)) {
|
if (!S_ISCHR(statbuf.st_mode)) {
|
||||||
warnx(_("%s not an lp device"), filename);
|
warnx(_("%s not an lp device"), filename);
|
||||||
|
|
Loading…
Reference in New Issue