From f66bbda8b1add9c11b8614f8792b0a7a43431a76 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Mon, 18 Jun 2007 19:52:55 +0000 Subject: [PATCH] Ooops, checked in a wrong (test-) version before! --- src/core/pbuf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/pbuf.c b/src/core/pbuf.c index bbc98460..aafa8e41 100644 --- a/src/core/pbuf.c +++ b/src/core/pbuf.c @@ -360,12 +360,12 @@ pbuf_header(struct pbuf *p, s16_t header_size_increment) if ((header_size_increment == 0) || (p == NULL)) return 0; - increment_magnitude = header_size_increment; - if (increment_magnitude < 0){ - increment_magnitude = -increment_magnitude; + if (header_size_increment < 0){ + increment_magnitude = -header_size_increment; /* Check that we aren't going to move off the end of the pbuf */ LWIP_ERROR("increment_magnitude > p->len", (increment_magnitude > p->len), return 1;); } else { + increment_magnitude = header_size_increment; #if 0 /* Can't assert these as some callers speculatively call pbuf_header() to see if it's OK. Will return 1 below instead. */