diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2013-02-25 14:48:42 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2013-02-25 14:48:42 (GMT) |
commit | 0fc1c9c5197d9d762ef6753f299d6ad7221f72a8 (patch) | |
tree | 4d5e5e3c1b6ae426ab46137907af39d683e0054f /src/H5system.c | |
parent | 66ba0b4f3309188dfd8e9b5c969dcca0014b8526 (diff) | |
download | hdf5-0fc1c9c5197d9d762ef6753f299d6ad7221f72a8.zip hdf5-0fc1c9c5197d9d762ef6753f299d6ad7221f72a8.tar.gz hdf5-0fc1c9c5197d9d762ef6753f299d6ad7221f72a8.tar.bz2 |
[svn-r23313] Description:
Bring changes from Coverity branch to the trunk:
r20612:
Changed string functions to versions with string length to fix coverity issues
922, 942 and 943.
r20614:
Use HDsnprintf. --gh
r20675:
Fix for coverity #1714 due to the fix for #810.
Use HDfree() instead of H5MM_xfree().
r20678:
Repaired coverity issue #598 -- failure to check return value from a
call to fstat(), or to tidy up in the event of failure.
r20679:
Use HDstrncpy. --gh
r20681:
Use HDstrncat and HDstrncpy. --gh
Tested on:
Mac OSX/64 10.8.2 (amazon) w/Debug, etc.
(too minor to require h5committest)
Diffstat (limited to 'src/H5system.c')
-rw-r--r-- | src/H5system.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/H5system.c b/src/H5system.c index 83cecba..3ffe411 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -707,7 +707,7 @@ H5_build_extpath(const char *name, char **extpath/*out*/) * OpenVMS: <disk name>$<partition>:[path]<file name> * i.g. SYS$SYSUSERS:[LU.HDF5.SRC]H5system.c */ - if(CHECK_ABSOLUTE(name)) { + if(H5_CHECK_ABSOLUTE(name)) { if(NULL == (full_path = (char *)H5MM_strdup(name))) HGOTO_ERROR(H5E_INTERNAL, H5E_NOSPACE, FAIL, "memory allocation failed") } /* end if */ @@ -726,7 +726,7 @@ H5_build_extpath(const char *name, char **extpath/*out*/) * Unix: does not apply * OpenVMS: does not apply */ - if(CHECK_ABS_DRIVE(name)) { + if(H5_CHECK_ABS_DRIVE(name)) { drive = name[0] - 'A' + 1; retcwd = HDgetdcwd(drive, cwdpath, MAX_PATH_LEN); HDstrcpy(new_name, &name[2]); @@ -737,7 +737,7 @@ H5_build_extpath(const char *name, char **extpath/*out*/) * Unix: does not apply * OpenVMS: does not apply */ - else if(CHECK_ABS_PATH(name) && (0 != (drive = HDgetdrive()))) { + else if(H5_CHECK_ABS_PATH(name) && (0 != (drive = HDgetdrive()))) { sprintf(cwdpath, "%c:%c", (drive+'A'-1), name[0]); retcwd = cwdpath; HDstrcpy(new_name, &name[1]); @@ -773,8 +773,8 @@ H5_build_extpath(const char *name, char **extpath/*out*/) else HDstrncat(full_path, new_name, HDstrlen(new_name)); #else - if(!CHECK_DELIMITER(cwdpath[cwdlen - 1])) - HDstrncat(full_path, DIR_SEPS, HDstrlen(DIR_SEPS)); + if(!H5_CHECK_DELIMITER(cwdpath[cwdlen - 1])) + HDstrncat(full_path, H5_DIR_SEPS, HDstrlen(H5_DIR_SEPS)); HDstrncat(full_path, new_name, HDstrlen(new_name)); #endif } /* end if */ @@ -784,7 +784,7 @@ H5_build_extpath(const char *name, char **extpath/*out*/) if(full_path) { char *ptr = NULL; - GET_LAST_DELIMITER(full_path, ptr) + H5_GET_LAST_DELIMITER(full_path, ptr) HDassert(ptr); *++ptr = '\0'; *extpath = full_path; |