*: hopefully all setup_common_bufsiz() are in place

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2016-04-21 18:38:51 +02:00
parent 47cfbf32fd
commit 9de2e5a222
29 changed files with 83 additions and 55 deletions

View File

@@ -162,10 +162,10 @@ int inotifyd_main(int argc, char **argv)
// read out all pending events
// (NB: len must be int, not ssize_t or long!)
#define eventbuf bb_common_bufsiz1
setup_common_bufsiz();
xioctl(pfd.fd, FIONREAD, &len);
#define eventbuf bb_common_bufsiz1
#define sizeof_eventbuf COMMON_BUFSIZE
ie = buf = (len <= sizeof_eventbuf) ? eventbuf : xmalloc(len);
ie = buf = (len <= COMMON_BUFSIZE) ? eventbuf : xmalloc(len);
len = full_read(pfd.fd, buf, len);
// process events. N.B. events may vary in length
while (len > 0) {