summaryrefslogtreecommitdiffstats
path: root/src/H5system.c
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2014-06-17 20:40:01 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2014-06-17 20:40:01 (GMT)
commit611d2c89afa02204e6321849d24aed26878097f0 (patch)
tree806802afc30a3a212d94b47ad661fd3b8c91a0df /src/H5system.c
parent720e0c7623be9847867b9d857329ab626ee8f3e8 (diff)
downloadhdf5-611d2c89afa02204e6321849d24aed26878097f0.zip
hdf5-611d2c89afa02204e6321849d24aed26878097f0.tar.gz
hdf5-611d2c89afa02204e6321849d24aed26878097f0.tar.bz2
[svn-r25307] Bring revisions #24698 - #24783 from trunk to revise_chunks.
Tested on jam, koala, ostrich, platypus.
Diffstat (limited to 'src/H5system.c')
-rw-r--r--src/H5system.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/H5system.c b/src/H5system.c
index 614b8b9..437a004 100644
--- a/src/H5system.c
+++ b/src/H5system.c
@@ -200,20 +200,28 @@ HDfprintf(FILE *stream, const char *fmt, ...)
case 'H':
if(sizeof(hsize_t) < sizeof(long))
modifier[0] = '\0';
- else if(sizeof(hsize_t) == sizeof(long))
- HDstrncpy(modifier, "l", (size_t)2);
- else
- HDstrncpy(modifier, H5_PRINTF_LL_WIDTH, HDstrlen(H5_PRINTF_LL_WIDTH) + 1);
+ else if(sizeof(hsize_t) == sizeof(long)) {
+ HDstrncpy(modifier, "l", sizeof(modifier));
+ modifier[sizeof(modifier) - 1] = '\0';
+ } /* end if */
+ else {
+ HDstrncpy(modifier, H5_PRINTF_LL_WIDTH, sizeof(modifier));
+ modifier[sizeof(modifier) - 1] = '\0';
+ } /* end else */
break;
case 'Z':
case 'z':
if(sizeof(size_t) < sizeof(long))
modifier[0] = '\0';
- else if(sizeof(size_t) == sizeof(long))
- HDstrncpy(modifier, "l", (size_t)2);
- else
- HDstrncpy(modifier, H5_PRINTF_LL_WIDTH, HDstrlen(H5_PRINTF_LL_WIDTH) + 1);
+ else if(sizeof(size_t) == sizeof(long)) {
+ HDstrncpy(modifier, "l", sizeof(modifier));
+ modifier[sizeof(modifier) - 1] = '\0';
+ } /* end if */
+ else {
+ HDstrncpy(modifier, H5_PRINTF_LL_WIDTH, sizeof(modifier));
+ modifier[sizeof(modifier) - 1] = '\0';
+ } /* end else */
break;
default: