From: William Lallemand Date: Fri, 24 Nov 2017 17:53:42 +0000 (+0100) Subject: MINOR: cache: replace a fprint() by an abort() X-Git-Tag: v1.8.0~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a71cd1d4072c3bb265cead9d11a4a24826d42be7;p=thirdparty%2Fhaproxy.git MINOR: cache: replace a fprint() by an abort() In the applet I/O handler we can never get an object bigger than a buffer, so we should never reach this case. --- diff --git a/src/cache.c b/src/cache.c index 5af51f27d5..3447038bfe 100644 --- a/src/cache.c +++ b/src/cache.c @@ -560,7 +560,9 @@ static void http_cache_io_handler(struct appctx *appctx) if (appctx->st0 == HTTP_CACHE_INIT) { int len = first->len - sizeof(struct cache_entry); if ((shctx_row_data_get(shctx, first, (unsigned char *)bi_end(res->buf), sizeof(struct cache_entry), len)) != 0) { - fprintf(stderr, "cache error too big: %d\n", first->len - (int)sizeof(struct cache_entry)); + /* should never get there, because at the moment, a + * cache object can never be bigger than a buffer */ + abort(); si_applet_cant_put(si); goto out;