Skip to content

Commit

Permalink
log: convert to strequal()
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Feb 13, 2021
1 parent 32ec743 commit c72ad27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lxc/log.c
Expand Up @@ -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);
Expand All @@ -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 */
Expand Down

0 comments on commit c72ad27

Please sign in to comment.