diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2014-12-22 01:04:32 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2014-12-22 01:04:32 +0000 |
commit | 266040fcc12715945edec022623f2dc45be31455 (patch) | |
tree | e3c15bcf7e94c66474ce0b94d9bbaff5700fdab1 | |
parent | 1fbc3336a593e7b34420172efbe81f0f4aa65ad3 (diff) | |
download | skalibs-2.0.0.0.tar.xz |
Renormalize buffer size, even if we lose 1 charv2.0.0.0
-rw-r--r-- | src/include/skalibs/buffer.h | 10 | ||||
-rw-r--r-- | src/include/skalibs/iobuffer.h | 2 | ||||
-rw-r--r-- | src/include/skalibs/unirandom.h | 2 | ||||
-rw-r--r-- | src/include/skalibs/unixmessage.h | 6 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/include/skalibs/buffer.h b/src/include/skalibs/buffer.h index 9060d08..5cf0950 100644 --- a/src/include/skalibs/buffer.h +++ b/src/include/skalibs/buffer.h @@ -27,11 +27,11 @@ struct buffer_s so that the head == tail case is nonambiguous (empty, not full). */ -#define BUFFER_INSIZE 8193 -#define BUFFER_OUTSIZE 8193 -#define BUFFER_ERRSIZE 1025 -#define BUFFER_INSIZE_SMALL 513 -#define BUFFER_OUTSIZE_SMALL 513 +#define BUFFER_INSIZE 8192 +#define BUFFER_OUTSIZE 8192 +#define BUFFER_ERRSIZE 1024 +#define BUFFER_INSIZE_SMALL 512 +#define BUFFER_OUTSIZE_SMALL 512 #define BUFFER_INIT(f, d, buf, len) { .op = (f), .fd = (d), .c = CBUFFER_INIT(buf, len) } extern int buffer_init (buffer *, buffer_io_func_t *, int, char *, unsigned int) ; diff --git a/src/include/skalibs/iobuffer.h b/src/include/skalibs/iobuffer.h index 93a98c5..b6abd2d 100644 --- a/src/include/skalibs/iobuffer.h +++ b/src/include/skalibs/iobuffer.h @@ -3,7 +3,7 @@ #ifndef IOBUFFER_H #define IOBUFFER_H -#define IOBUFFER_SIZE 65537U +#define IOBUFFER_SIZE 65536U /* iobufferu */ diff --git a/src/include/skalibs/unirandom.h b/src/include/skalibs/unirandom.h index ecbe6de..818990e 100644 --- a/src/include/skalibs/unirandom.h +++ b/src/include/skalibs/unirandom.h @@ -6,7 +6,7 @@ #include <skalibs/buffer.h> #include <skalibs/surf.h> -#define RANDOMBUF_BUFSIZE 257 +#define RANDOMBUF_BUFSIZE 256 struct randombuf_s { diff --git a/src/include/skalibs/unixmessage.h b/src/include/skalibs/unixmessage.h index 28e084c..ab9b942 100644 --- a/src/include/skalibs/unixmessage.h +++ b/src/include/skalibs/unixmessage.h @@ -37,9 +37,9 @@ struct unixmessage_v_s #define UNIXMESSAGE_V_ZERO { .v = 0, .vlen = 0, .fds = 0, .nfds = 0 } extern unixmessage_v_t const unixmessage_v_zero ; -#define UNIXMESSAGE_BUFSIZE 2049 -#define UNIXMESSAGE_AUXBUFSIZE 2049 -#define UNIXMESSAGE_MAXFDS 256 +#define UNIXMESSAGE_BUFSIZE 2048 +#define UNIXMESSAGE_MAXFDS 255 +#define UNIXMESSAGE_AUXBUFSIZE (sizeof(int) * UNIXMESSAGE_MAXFDS + 1) #define UNIXMESSAGE_MAXREADS 32 |