diff options
author | van Hauser <vh@thc.org> | 2020-11-06 09:37:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-06 09:37:14 +0100 |
commit | 3b799c09cd68bb68b26784261f1fbaa3e737c747 (patch) | |
tree | e581c3689d5fe231678464bb6bd48cab75c7db41 /include/debug.h | |
parent | 5ee63a6e6267e448342ccb28cc8d3c0d34ffc1cd (diff) | |
parent | 50c98445fe74b92d2e6ab784def3e8b26a662b36 (diff) | |
download | afl++-3b799c09cd68bb68b26784261f1fbaa3e737c747.tar.gz |
Merge pull request #594 from AFLplusplus/dev
push to stable
Diffstat (limited to 'include/debug.h')
-rw-r--r-- | include/debug.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/include/debug.h b/include/debug.h index f9ebce58..e6d3c3fc 100644 --- a/include/debug.h +++ b/include/debug.h @@ -273,13 +273,15 @@ /* Error-checking versions of read() and write() that call RPFATAL() as appropriate. */ -#define ck_write(fd, buf, len, fn) \ - do { \ - \ - s32 _len = (s32)(len); \ - s32 _res = write(fd, buf, _len); \ - if (_res != _len) RPFATAL(_res, "Short write to %s", fn); \ - \ +#define ck_write(fd, buf, len, fn) \ + do { \ + \ + int _fd = (fd); \ + \ + s32 _len = (s32)(len); \ + s32 _res = write(_fd, (buf), _len); \ + if (_res != _len) RPFATAL(_res, "Short write to %s, fd %d", fn, _fd); \ + \ } while (0) #define ck_read(fd, buf, len, fn) \ |