diff options
author | Bill Wendling <wendling@ncsa.uiuc.edu> | 2001-05-25 21:00:41 (GMT) |
---|---|---|
committer | Bill Wendling <wendling@ncsa.uiuc.edu> | 2001-05-25 21:00:41 (GMT) |
commit | 07b035e2d41e6f92186380a616815615e932f9de (patch) | |
tree | d3ae7142426e1b4e73310d270b16c11cc19e9c58 /test | |
parent | f9653273a7d82e9558db38287a0d715016c1dc91 (diff) | |
download | hdf5-07b035e2d41e6f92186380a616815615e932f9de.zip hdf5-07b035e2d41e6f92186380a616815615e932f9de.tar.gz hdf5-07b035e2d41e6f92186380a616815615e932f9de.tar.bz2 |
[svn-r3944] Purpose:
Fixlet
Description:
Some variables weren't being assigned before being used.
Solution:
Initialized with '\0'.
Platforms tested:
Linux
Diffstat (limited to 'test')
-rw-r--r-- | test/h5test.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/test/h5test.c b/test/h5test.c index bcb108e..deca1fc 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -1,6 +1,6 @@ /* - * Copyright © 1998 NCSA - * All rights reserved. + * Copyright (c) 1998-2001 National Center for Supercomputing Applications + * All rights reserved. * * Programmer: Robb Matzke <matzke@llnl.gov> * Thursday, November 19, 1998 @@ -14,7 +14,7 @@ #ifdef WIN32 #include <process.h> -#endif +#endif /* WIN32 */ /* * Define these environment variables or constants to influence functions in @@ -271,18 +271,17 @@ h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size) { const char *prefix = NULL; const char *suffix = ".h5"; /* suffix has default */ - char *ptr, last; + char *ptr, last = '\0'; size_t i, j; #ifdef H5_WANT_H5_V1_2_COMPAT H5F_driver_t driver; -#else /* H5_WANT_H5_V1_2_COMPAT */ +#else hid_t driver; #endif /* H5_WANT_H5_V1_2_COMPAT */ if (!base_name || !fullname || size < 1) return NULL; - /* If we have a prefix, then prepend that to fullname */ memset(fullname, 0, size); #ifdef H5_WANT_H5_V1_2_COMPAT @@ -457,7 +456,7 @@ h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size) last = *ptr; } - + return fullname; } |