Skip to content

Commit

Permalink
fix: log support multi-thread
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
  • Loading branch information
zhaojh329 committed Mar 29, 2021
1 parent 7f5b413 commit 7892e64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/log.c
Expand Up @@ -41,7 +41,7 @@ void (*log_write)(int priority, const char *fmt, va_list ap);
static const char *log_ident()
{
FILE *self;
static char line[64];
char line[64];

This comment has been minimized.

Copy link
@xfan1024

xfan1024 May 12, 2021

returns address of local variable

This comment has been minimized.

Copy link
@zhaojh329

zhaojh329 May 12, 2021

Author Owner

Thanks.

This comment has been minimized.

Copy link
@zhaojh329

zhaojh329 May 12, 2021

Author Owner
char *p = NULL;
char *sbuf;

Expand Down Expand Up @@ -119,7 +119,7 @@ void uh_log_close()

void __uh_log(const char *filename, int line, int priority, const char *fmt, ...)
{
static char new_fmt[256];
char new_fmt[256];
va_list ap;

if (priority > log_threshold)
Expand Down

0 comments on commit 7892e64

Please sign in to comment.