aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDominik Maier <domenukk@gmail.com>2020-08-31 23:59:10 +0200
committerDominik Maier <domenukk@gmail.com>2020-08-31 23:59:10 +0200
commitbd57784664a7de62c726a0fb2aaabd41471faa0c (patch)
tree87037c2441a397fd8404d1ec8661e497b21eaec1 /src
parent4261e17b3e9d90fea9495fc046d55976cc9e7647 (diff)
downloadafl++-bd57784664a7de62c726a0fb2aaabd41471faa0c.tar.gz
code format
Diffstat (limited to 'src')
-rw-r--r--src/afl-fuzz-redqueen.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/afl-fuzz-redqueen.c b/src/afl-fuzz-redqueen.c
index 73d00f9a..9a9ac33f 100644
--- a/src/afl-fuzz-redqueen.c
+++ b/src/afl-fuzz-redqueen.c
@@ -265,7 +265,7 @@ static u8 its_fuzz(afl_state_t *afl, u8 *buf, u32 len, u8 *status) {
}
static int strntoll(const char *str, size_t sz, char **end, int base,
- long long* out) {
+ long long *out) {
char buf[64];
long long ret;
@@ -273,16 +273,13 @@ static int strntoll(const char *str, size_t sz, char **end, int base,
for (; beg && sz && *beg == ' '; beg++, sz--) {};
- if (!sz)
- return 1;
- if (sz >= sizeof(buf))
- sz = sizeof(buf) -1;
+ if (!sz) return 1;
+ if (sz >= sizeof(buf)) sz = sizeof(buf) - 1;
memcpy(buf, beg, sz);
buf[sz] = '\0';
ret = strtoll(buf, end, base);
- if ((ret == LLONG_MIN || ret == LLONG_MAX) && errno == ERANGE)
- return 1;
+ if ((ret == LLONG_MIN || ret == LLONG_MAX) && errno == ERANGE) return 1;
if (end) *end = (char *)beg + (*end - buf);
*out = ret;
@@ -291,7 +288,7 @@ static int strntoll(const char *str, size_t sz, char **end, int base,
}
static int strntoull(const char *str, size_t sz, char **end, int base,
- unsigned long long* out) {
+ unsigned long long *out) {
char buf[64];
unsigned long long ret;
@@ -300,16 +297,13 @@ static int strntoull(const char *str, size_t sz, char **end, int base,
for (; beg && sz && *beg == ' '; beg++, sz--)
;
- if (!sz)
- return 1;
- if (sz >= sizeof(buf))
- sz = sizeof(buf) -1;
+ if (!sz) return 1;
+ if (sz >= sizeof(buf)) sz = sizeof(buf) - 1;
memcpy(buf, beg, sz);
buf[sz] = '\0';
ret = strtoull(buf, end, base);
- if (ret == ULLONG_MAX && errno == ERANGE)
- return 1;
+ if (ret == ULLONG_MAX && errno == ERANGE) return 1;
if (end) *end = (char *)beg + (*end - buf);
*out = ret;
@@ -350,6 +344,7 @@ static u8 cmp_extend_encoding(afl_state_t *afl, struct cmp_header *h,
use_unum = 1;
} else
+
use_num = 1;
}