]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
log: convert to strequal()
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 13 Feb 2021 20:23:01 +0000 (21:23 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sat, 13 Feb 2021 20:23:01 +0000 (21:23 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/log.c

index fd35a48bb899de637d08b4f48f79dd520ae6b1cb..92b526689488db3048e95da7f7dd39205ff02cb6 100644 (file)
@@ -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 */