summaryrefslogtreecommitdiff
path: root/files.c
diff options
context:
space:
mode:
authorAnestis Bechtsoudis <anestis@census-labs.com>2016-02-07 12:55:55 +0200
committerAnestis Bechtsoudis <anestis@census-labs.com>2016-02-07 12:55:55 +0200
commit3857255feb7e40ea49e629e79193908b188ebec7 (patch)
treeef4a34addcba80f48f782edcc4db99bcb8239328 /files.c
parenta7c56ceb30bbff386bf5dcc99afbee5ad9b19a9a (diff)
downloadhonggfuzz-3857255feb7e40ea49e629e79193908b188ebec7.tar.gz
PERF: Don't init perf if not fuzzing with perf feedback enabled
Also remove some redundant extern from util function implementations. Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
Diffstat (limited to 'files.c')
-rw-r--r--files.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/files.c b/files.c
index 15fba992..1fcb13d0 100644
--- a/files.c
+++ b/files.c
@@ -109,10 +109,7 @@ size_t files_readFromFd(int fd, uint8_t * buf, size_t fileSz)
if (sz < 0 && errno == EINTR)
continue;
- if (sz < 0)
- break;
-
- if (sz == 0)
+ if (sz <= 0)
break;
readSz += sz;