Skip to content

Commit

Permalink
WIP: discussion point for last sprintf
Browse files Browse the repository at this point in the history
  • Loading branch information
seanm committed Feb 13, 2024
1 parent be956ea commit b92d0a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/H5Omtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ H5O__mtime_new_encode(H5F_t H5_ATTR_UNUSED *f, bool H5_ATTR_UNUSED disable_share
*-------------------------------------------------------------------------
*/
static herr_t
H5O__mtime_encode(H5F_t H5_ATTR_UNUSED *f, bool H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
H5O__mtime_encode(H5F_t H5_ATTR_UNUSED *f, bool H5_ATTR_UNUSED disable_shared, uint8_t *p, /*size_t p_size, */ const void *_mesg)
{
const time_t *mesg = (const time_t *)_mesg;
struct tm *tm;
Expand All @@ -271,7 +271,7 @@ H5O__mtime_encode(H5F_t H5_ATTR_UNUSED *f, bool H5_ATTR_UNUSED disable_shared, u

/* encode */
tm = HDgmtime(mesg);
sprintf((char *)p, "%04d%02d%02d%02d%02d%02d", 1900 + tm->tm_year, 1 + tm->tm_mon, tm->tm_mday,
sprintf((char *)p, /*p_size,*/ "%04d%02d%02d%02d%02d%02d", 1900 + tm->tm_year, 1 + tm->tm_mon, tm->tm_mday,
tm->tm_hour, tm->tm_min, tm->tm_sec);

FUNC_LEAVE_NOAPI(SUCCEED)
Expand Down
2 changes: 1 addition & 1 deletion src/H5Opkg.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ struct H5O_msg_class_t {
size_t native_size; /*size of native message */
unsigned share_flags; /* Message sharing settings */
void *(*decode)(H5F_t *, H5O_t *, unsigned, unsigned *, size_t, const uint8_t *);
herr_t (*encode)(H5F_t *, bool, uint8_t *, const void *);
herr_t (*encode)(H5F_t *, bool, uint8_t *, /*size_t,*/ const void *);
void *(*copy)(const void *, void *); /*copy native value */
size_t (*raw_size)(const H5F_t *, bool, const void *); /*sizeof encoded message */
herr_t (*reset)(void *); /*free nested data structs */
Expand Down

0 comments on commit b92d0a8

Please sign in to comment.