summaryrefslogtreecommitdiffstats
path: root/src/H5Oname.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1997-09-02 15:38:26 (GMT)
committerRobb Matzke <matzke@llnl.gov>1997-09-02 15:38:26 (GMT)
commit9d41d3679e1b5d0bb430a7374bb458656e127f15 (patch)
tree2b2a22546f93a839e5b1c9b63e7d36251bb0bb24 /src/H5Oname.c
parent07dacb9486230fe2522efca266ab06f4558527c3 (diff)
downloadhdf5-9d41d3679e1b5d0bb430a7374bb458656e127f15.zip
hdf5-9d41d3679e1b5d0bb430a7374bb458656e127f15.tar.gz
hdf5-9d41d3679e1b5d0bb430a7374bb458656e127f15.tar.bz2
[svn-r61] ./src/H5.c
Changed atexit() to HDatexit(). ./src/H5AC.c Changed qsort() to HDqsort(). ./src/H5B.c Changed memcmp() to HDmemcmp(). ./src/H5E.c ./src/H5M.c Added parentheses around indirect function calls so that checkposix doesn't complain and to advertise that it's an indirect function call. ./src/H5F.c ./src/H5G.c Added errors field to each function prologue to test the script mentioned above. ./src/H5H.c Changed fputc() to HDfputc(). ./src/H5MM.c ./src/H5MMprivate.h The argument for H5MM_xfree() is a pointer to a constant even though the argument to free() isn't. This reduces the number of warnings in other parts of the code but creates a new warning in this file. ./src/H5O.c Plugged a few memory leaks that happen during error handling. ./src/H5Oname.c ./src/debug.c Added `HD' to the beginning of some posix functions.
Diffstat (limited to 'src/H5Oname.c')
-rw-r--r--src/H5Oname.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/H5Oname.c b/src/H5Oname.c
index 47d5669..5631887 100644
--- a/src/H5Oname.c
+++ b/src/H5Oname.c
@@ -72,6 +72,7 @@ static void *
H5O_name_decode (hdf5_file_t *f, size_t raw_size, const uint8 *p)
{
H5O_name_t *mesg;
+ char *s;
FUNC_ENTER (H5O_name_decode, NULL, NULL);
@@ -81,8 +82,9 @@ H5O_name_decode (hdf5_file_t *f, size_t raw_size, const uint8 *p)
/* decode */
mesg = H5MM_xcalloc (1, sizeof(H5O_name_t));
- mesg->s = H5MM_xmalloc (raw_size);
- HDmemcpy (mesg->s, p, raw_size);
+ s = H5MM_xmalloc (raw_size);
+ HDmemcpy (s, p, raw_size);
+ mesg->s = s;
FUNC_LEAVE (mesg);
}
@@ -119,7 +121,7 @@ H5O_name_encode (hdf5_file_t *f, size_t raw_size, uint8 *p, const void *_mesg)
assert (mesg && mesg->s);
/* message size */
- size = strlen (mesg->s)+1;
+ size = HDstrlen (mesg->s)+1;
assert (size<=raw_size);
/* encode */