summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2019-06-18 19:23:06 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2019-06-18 19:23:06 (GMT)
commitea966597d513e1df8feb96887cd51aa0e48c85ba (patch)
treee9fa7bc6097f46f24aebdd8034f0dca20e774550 /src
parentd767e6a067aacee0d33a51d5c584d6676afc3df9 (diff)
downloadhdf5-ea966597d513e1df8feb96887cd51aa0e48c85ba.zip
hdf5-ea966597d513e1df8feb96887cd51aa0e48c85ba.tar.gz
hdf5-ea966597d513e1df8feb96887cd51aa0e48c85ba.tar.bz2
Updated the HDqsort() macro to ensure we don't pass NULL buffers to
qsort(3) in the future.
Diffstat (limited to 'src')
-rw-r--r--src/H5private.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5private.h b/src/H5private.h
index dad2d94..06592eb 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -1171,7 +1171,7 @@ typedef off_t h5_stat_size_t;
#define HDpwrite(F,B,C,O) pwrite(F,B,C,O)
#endif /* HDpwrite */
#ifndef HDqsort
- #define HDqsort(M,N,Z,F) qsort(M,N,Z,F)
+ #define HDqsort(M,N,Z,F) do {HDassert(M); qsort(M,N,Z,F);} while(0)
#endif /* HDqsort*/
#ifndef HDraise
#define HDraise(N) raise(N)