diff options
author | Anestis Bechtsoudis <anestis@census-labs.com> | 2016-10-31 08:51:14 +0200 |
---|---|---|
committer | Anestis Bechtsoudis <anestis@census-labs.com> | 2016-10-31 08:51:14 +0200 |
commit | 3dce6acf4ab975fab66f54637792cebb9d1ce947 (patch) | |
tree | 2adfa0e561b013836a0436434e33f565411d4c49 /files.c | |
parent | 12e246245374b2e6045c2a5a564f0ab3381b1d17 (diff) | |
download | honggfuzz-3dce6acf4ab975fab66f54637792cebb9d1ce947.tar.gz |
Indent + comments
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
Diffstat (limited to 'files.c')
-rw-r--r-- | files.c | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -430,15 +430,21 @@ bool files_parseBlacklist(honggfuzz_t * hfuzz) return true; } -size_t files_parseSymbolFilter(const char *inFIle, char ***filterList) +/* + * Reads symbols from src file (one per line) and append them to filterList. The + * total number of added symbols is returned. + * + * Simple wildcard strings are also supported (e.g. mem*) + */ +size_t files_parseSymbolFilter(const char *srcFile, char ***filterList) { - FILE *fSBl = fopen(inFIle, "rb"); - if (fSBl == NULL) { - PLOG_W("Couldn't open '%s' - R/O mode", inFIle); + FILE *f = fopen(srcFile, "rb"); + if (f == NULL) { + PLOG_W("Couldn't open '%s' - R/O mode", srcFile); return 0; } defer { - fclose(fSBl); + fclose(f); }; char *lineptr = NULL; @@ -448,7 +454,7 @@ size_t files_parseSymbolFilter(const char *inFIle, char ***filterList) size_t symbolsRead = 0, n = 0; for (;;) { - if (getline(&lineptr, &n, fSBl) == -1) { + if (getline(&lineptr, &n, f) == -1) { break; } |