From 8cdf45dfe8ce13cc8f0f5e20af73efd5fb5c0a3a Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Mon, 1 Jun 2009 15:33:33 +0000 Subject: [PATCH] In decompress_iob(), remove the skip_bytes history lesson and remove an unnecessary and incorrect assert(). --- parsers.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/parsers.c b/parsers.c index f5da86e8..dbaa8098 100644 --- a/parsers.c +++ b/parsers.c @@ -1,4 +1,4 @@ -const char parsers_rcs[] = "$Id: parsers.c,v 1.169 2009/06/01 14:18:49 fabiankeil Exp $"; +const char parsers_rcs[] = "$Id: parsers.c,v 1.170 2009/06/01 15:14:40 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/parsers.c,v $ @@ -451,30 +451,13 @@ jb_err decompress_iob(struct client_state *csp) /* * Skip a given number of bytes, specified * as a 16-bit little-endian value. - */ - /* - * XXX: This code used to be: - * - * csp->iob->cur += *csp->iob->cur++ + (*csp->iob->cur++ << 8); - * - * which I had to change into: * - * cur += *cur++ + (*cur++ << 8); - * - * at which point gcc43 finally noticed that the value - * of cur is undefined (it depends on which of the - * summands is evaluated first). - * - * I haven't come across a site where this - * code is actually executed yet, but I hope - * it works anyway. + * XXX: this code is untested and should probably be removed. */ int skip_bytes; skip_bytes = *cur++; skip_bytes += *cur++ << 8; - assert(skip_bytes == *csp->iob->cur - 2 + ((*csp->iob->cur - 1) << 8)); - /* * The number of bytes to skip should be positive * and we'd like to stay in the buffer. -- 2.39.2