From f5b0c68a53004cabf9b307bc50a00f4740448d9e Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 23 Oct 2002 14:35:36 -0500 Subject: [svn-r6028] Purpose: Bug Fix Description: The NBYTE{ENCODE,DECODE} macros were updating the pointer "p" to a new value instead of one of the "real" pointers passed into the macro. Solution: Changed it so that it updates the destination pointer which gets passed into these macros. I'm not sure if this is correct, since neither of these macros are actually used in our source code... Platforms tested: They aren't used, so no testing possible. --- src/H5Fprivate.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index 3f5de41..b1c591c 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -138,13 +138,13 @@ typedef struct H5F_t H5F_t; (p) += 8; \ } -#define NBYTEENCODE(d, s, n) { HDmemcpy(d,s,n); p+=n } +#define NBYTEENCODE(d, s, n) do { HDmemcpy(d,s,n); d += n; } while (0) /* * Note: the NBYTEDECODE macro is backwards from the memcpy() routine, in * the spirit of the other DECODE macros. */ -#define NBYTEDECODE(s, d, n) { HDmemcpy(d,s,n); p+=n } +#define NBYTEDECODE(s, d, n) do { HDmemcpy(d,s,n); d += n; } while (0) /* Address-related macros */ #define H5F_addr_overflow(X,Z) (HADDR_UNDEF==(X) || \ -- cgit v0.12