Skip to content

Commit

Permalink
lib: replace one path with macro
Browse files Browse the repository at this point in the history
Replace all of the path name with macro, only the two places.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
  • Loading branch information
anlancs committed Sep 7, 2022
1 parent 340ed5f commit b5d1433
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/zlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -991,16 +991,14 @@ void zlog_init(const char *progname, const char *protoname,
zlog_instance = instance;

if (instance) {
snprintfrr(zlog_tmpdir, sizeof(zlog_tmpdir),
"/var/tmp/frr/%s-%d.%ld",
progname, instance, (long)getpid());
snprintfrr(zlog_tmpdir, sizeof(zlog_tmpdir), "%s/%s-%d.%ld",
TMPBASEDIR, progname, instance, (long)getpid());

zlog_prefixsz = snprintfrr(zlog_prefix, sizeof(zlog_prefix),
"%s[%d]: ", protoname, instance);
} else {
snprintfrr(zlog_tmpdir, sizeof(zlog_tmpdir),
"/var/tmp/frr/%s.%ld",
progname, (long)getpid());
snprintfrr(zlog_tmpdir, sizeof(zlog_tmpdir), "%s/%s.%ld",
TMPBASEDIR, progname, (long)getpid());

zlog_prefixsz = snprintfrr(zlog_prefix, sizeof(zlog_prefix),
"%s: ", protoname);
Expand Down

0 comments on commit b5d1433

Please sign in to comment.