From de0e88735cf70a6e88a8332399478411e4911598 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 5 Oct 2015 00:46:28 +0000 Subject: - Fix double macro expansion bug in cbuffer_get* and cbuffer_put* - rc for 2.3.7.1 --- src/libstddjb/cbuffer_get.c | 4 +++- src/libstddjb/cbuffer_getv.c | 4 +++- src/libstddjb/cbuffer_put.c | 4 +++- src/libstddjb/cbuffer_putv.c | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) (limited to 'src/libstddjb') diff --git a/src/libstddjb/cbuffer_get.c b/src/libstddjb/cbuffer_get.c index 544cbb2..d322a03 100644 --- a/src/libstddjb/cbuffer_get.c +++ b/src/libstddjb/cbuffer_get.c @@ -6,6 +6,8 @@ unsigned int cbuffer_get (cbuffer_t *b, char *s, unsigned int len) { siovec_t v[2] ; + register unsigned int w ; cbuffer_rpeek(b, v) ; - return cbuffer_RSEEK(b, siovec_gather(v, 2, s, len)) ; + w = siovec_gather(v, 2, s, len) ; + return cbuffer_RSEEK(b, w) ; } diff --git a/src/libstddjb/cbuffer_getv.c b/src/libstddjb/cbuffer_getv.c index 3db638f..22bd6f7 100644 --- a/src/libstddjb/cbuffer_getv.c +++ b/src/libstddjb/cbuffer_getv.c @@ -6,6 +6,8 @@ unsigned int cbuffer_getv (cbuffer_t *b, siovec_t const *v, unsigned int n) { siovec_t vsrc[2] ; + register unsigned int w ; cbuffer_rpeek(b, vsrc) ; - return cbuffer_RSEEK(b, siovec_deal(v, n, vsrc, 2)) ; + w = siovec_deal(v, n, vsrc, 2) ; + return cbuffer_RSEEK(b, w) ; } diff --git a/src/libstddjb/cbuffer_put.c b/src/libstddjb/cbuffer_put.c index 12f513e..5733d21 100644 --- a/src/libstddjb/cbuffer_put.c +++ b/src/libstddjb/cbuffer_put.c @@ -6,6 +6,8 @@ unsigned int cbuffer_put (cbuffer_t *b, char const *s, unsigned int len) { siovec_t v[2] ; + register unsigned int w ; cbuffer_wpeek(b, v) ; - return cbuffer_WSEEK(b, siovec_scatter(v, 2, s, len)) ; + w = siovec_scatter(v, 2, s, len) ; + return cbuffer_WSEEK(b, w) ; } diff --git a/src/libstddjb/cbuffer_putv.c b/src/libstddjb/cbuffer_putv.c index 66bed05..6a914de 100644 --- a/src/libstddjb/cbuffer_putv.c +++ b/src/libstddjb/cbuffer_putv.c @@ -6,6 +6,8 @@ unsigned int cbuffer_putv (cbuffer_t *b, siovec_t const *v, unsigned int n) { siovec_t vdest[2] ; + register unsigned int w ; cbuffer_wpeek(b, vdest) ; - return cbuffer_WSEEK(b, siovec_deal(vdest, 2, v, n)) ; + w = siovec_deal(vdest, 2, v, n) ; + return cbuffer_WSEEK(b, w) ; } -- cgit v1.2.3