diff options
author | Christos Zoulas <christos@zoulas.com> | 2020-06-08 19:44:10 +0000 |
---|---|---|
committer | Christos Zoulas <christos@zoulas.com> | 2020-06-08 19:44:10 +0000 |
commit | dc36790a1ad9207022830da4106dae549e397745 (patch) | |
tree | d9cff9d0c898c5d32a477883ab57325d1c9919f0 | |
parent | 3e18d598622fd7f792ea7e68dad738fc7bbb4dc4 (diff) | |
download | file-git-dc36790a1ad9207022830da4106dae549e397745.tar.gz |
Eliminate unused if, found by static analysis (Steve Grubb)
-rw-r--r-- | src/magic.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/magic.c b/src/magic.c index da5baf10..17a7077d 100644 --- a/src/magic.c +++ b/src/magic.c @@ -33,7 +33,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: magic.c,v 1.111 2019/05/07 02:27:11 christos Exp $") +FILE_RCSID("@(#)$File: magic.c,v 1.112 2020/06/08 19:44:10 christos Exp $") #endif /* lint */ #include "magic.h" @@ -463,8 +463,7 @@ file_or_fd(struct magic_set *ms, const char *inname, int fd) } if (fd != -1) { - if (!okstat) - okstat = fstat(fd, &sb) == 0; + okstat = fstat(fd, &sb) == 0; if (okstat && S_ISFIFO(sb.st_mode)) ispipe = 1; if (inname == NULL) |