Skip to content

curl, --trace-time, cache value for a second - #11211

Closed
icing wants to merge 1 commit into
curl:masterfrom
icing:curl-log-time-cached
Closed

icing wants to merge 1 commit into
curl:masterfrom
icing:curl-log-time-cached

Conversation

@icing

@icing icing commented May 26, 2023

Copy link
Copy Markdown
Contributor
  • caches HH:MM:SS computed and reuses it for logging during the same second.
  • common function for plain log line start formatting

- caches HH:MM:SS computed and reuses it for logging during
  the same second.
- common function for plain log line start formatting
Comment thread src/tool_cb_dbg.c
}
secs = epoch_offset + tv_sec;
/* !checksrc! disable BANNEDFUNC 1 */
now = localtime(&secs); /* not thread safe but we don't care */

Check failure

Code scanning / CodeQL

Use of potentially dangerous function

Call to 'localtime' is potentially dangerous.
@bagder

bagder commented May 28, 2023

Copy link
Copy Markdown
Member

Thanks!

@bagder bagder closed this in 64dedb4 May 28, 2023
bch pushed a commit to bch/curl that referenced this pull request Jul 19, 2023
- caches HH:MM:SS computed and reuses it for logging during
  the same second.
- common function for plain log line start formatting

Closes curl#11211
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants