From: Christian Brauner Date: Sat, 13 Feb 2021 20:23:01 +0000 (+0100) Subject: log: convert to strequal() X-Git-Tag: lxc-5.0.0~290^2~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c72ad27f4ab7a78433c61a9042955fde6f852c2e;p=thirdparty%2Flxc.git log: convert to strequal() Signed-off-by: Christian Brauner --- 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 */