summaryrefslogtreecommitdiffstats
path: root/src/H5Fprivate.h
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2002-10-23 19:35:36 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2002-10-23 19:35:36 (GMT)
commitf5b0c68a53004cabf9b307bc50a00f4740448d9e (patch)
tree225fcb14177075c222c05268118cb4527c16e2cf /src/H5Fprivate.h
parentc6cb0df0fd21879c6cb03f43cc2d9bcfb3f1ba8a (diff)
downloadhdf5-f5b0c68a53004cabf9b307bc50a00f4740448d9e.zip
hdf5-f5b0c68a53004cabf9b307bc50a00f4740448d9e.tar.gz
hdf5-f5b0c68a53004cabf9b307bc50a00f4740448d9e.tar.bz2
[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.
Diffstat (limited to 'src/H5Fprivate.h')
-rw-r--r--src/H5Fprivate.h4
1 files 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) || \