diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2013-03-20 04:41:16 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2013-03-20 04:41:16 (GMT) |
commit | 1d95950134130c55247df3dd6bf833756db28625 (patch) | |
tree | 36efd13fbfdde2fa7f01dd52acdc23d29efa54a3 /tools/lib/h5diff_attr.c | |
parent | 1e56e8ce4f8725320c1903aa028c349f43dcb9da (diff) | |
download | hdf5-1d95950134130c55247df3dd6bf833756db28625.zip hdf5-1d95950134130c55247df3dd6bf833756db28625.tar.gz hdf5-1d95950134130c55247df3dd6bf833756db28625.tar.bz2 |
[svn-r23396] Description:
Bring r23395 from trunk to 1.8 branch:
Bring Coverity changes from branch to trunk:
r20682:
fixed coverity:
76, 77, 635, 636, 1164, 1165, 1166, 1121, 1122, 1117, 1343
Tested on:
Mac OSX/64 10.8.3 (amazon) w/C++ & FORTRAN
(too minor to require h5committest)
Diffstat (limited to 'tools/lib/h5diff_attr.c')
-rw-r--r-- | tools/lib/h5diff_attr.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c index 4899200..ef1d761 100644 --- a/tools/lib/h5diff_attr.c +++ b/tools/lib/h5diff_attr.c @@ -108,17 +108,17 @@ static void table_attrs_free( table_attrs_t *table ) *------------------------------------------------------------------------*/ static void table_attr_mark_exist(unsigned *exist, char *name, table_attrs_t *table) { - unsigned int new; + size_t new_val; if(table->nattrs == table->size) { table->size = MAX(1, table->size * 2); table->attrs = (match_attr_t *)HDrealloc(table->attrs, table->size * sizeof(match_attr_t)); } /* end if */ - new = table->nattrs++; - table->attrs[new].exist[0] = exist[0]; - table->attrs[new].exist[1] = exist[1]; - table->attrs[new].name = (char *)HDstrdup(name); + new_val = table->nattrs++; + table->attrs[new_val].exist[0] = exist[0]; + table->attrs[new_val].exist[1] = exist[1]; + table->attrs[new_val].name = (char *)HDstrdup(name); } /*------------------------------------------------------------------------- @@ -459,8 +459,8 @@ hsize_t diff_attr(hid_t loc1_id, goto error; /* format output string */ - sprintf(np1,"%s of <%s>",name1,path1); - sprintf(np2,"%s of <%s>",name2,path2); + HDsnprintf(np1, sizeof(np1), "%s of <%s>", name1, path1); + HDsnprintf(np2, sizeof(np1), "%s of <%s>", name2, path2); /*--------------------------------------------------------------------- * array compare |