diff options
Diffstat (limited to 'src/H5Oefl.c')
-rw-r--r-- | src/H5Oefl.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/H5Oefl.c b/src/H5Oefl.c index 487b6f4..c6db7c3 100644 --- a/src/H5Oefl.c +++ b/src/H5Oefl.c @@ -545,7 +545,6 @@ H5O_efl_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE * s int indent, int fwidth) { const H5O_efl_t *mesg = (const H5O_efl_t *) _mesg; - char buf[64]; size_t u; FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -565,8 +564,10 @@ H5O_efl_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE * s mesg->nused, mesg->nalloc); for(u = 0; u < mesg->nused; u++) { - sprintf (buf, "File %u", (unsigned)u); - HDfprintf (stream, "%*s%s:\n", indent, "", buf); + char buf[64]; + + HDsnprintf(buf, sizeof(buf), "File %u", (unsigned)u); + HDfprintf(stream, "%*s%s:\n", indent, "", buf); HDfprintf(stream, "%*s%-*s \"%s\"\n", indent+3, "", MAX (fwidth-3, 0), "Name:", @@ -576,11 +577,11 @@ H5O_efl_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE * s "Name offset:", (unsigned long)(mesg->slot[u].name_offset)); - HDfprintf (stream, "%*s%-*s %lu\n", indent+3, "", MAX (fwidth-3, 0), + HDfprintf(stream, "%*s%-*s %lu\n", indent+3, "", MAX (fwidth-3, 0), "Offset of data in file:", (unsigned long)(mesg->slot[u].offset)); - HDfprintf (stream, "%*s%-*s %lu\n", indent+3, "", MAX (fwidth-3, 0), + HDfprintf(stream, "%*s%-*s %lu\n", indent+3, "", MAX (fwidth-3, 0), "Bytes reserved for data:", (unsigned long)(mesg->slot[u].size)); } /* end for */ |