From c72ad27f4ab7a78433c61a9042955fde6f852c2e Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Sat, 13 Feb 2021 21:23:01 +0100 Subject: [PATCH] log: convert to strequal() Signed-off-by: Christian Brauner --- src/lxc/log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lxc/log.c b/src/lxc/log.c index fd35a48bb..92b526689 100644 --- a/src/lxc/log.c +++ b/src/lxc/log.c @@ -670,7 +670,7 @@ int lxc_log_init(struct lxc_log *log) log_vmname = strdup(log->name); if (log->file) { - if (strcmp(log->file, "none") == 0) + if (strequal(log->file, "none")) return 0; ret = __lxc_log_set_file(log->file, 1); @@ -689,7 +689,7 @@ int lxc_log_init(struct lxc_log *log) log->lxcpath = LOGPATH; /* try LOGPATH if lxcpath is the default for the privileged containers */ - if (!geteuid() && strcmp(LXCPATH, log->lxcpath) == 0) + if (!geteuid() && strequal(LXCPATH, log->lxcpath)) ret = _lxc_log_set_file(log->name, NULL, 0); /* try in lxcpath */ -- 2.47.2