start: convert to strequal()

parent d1b30cbb
...@@ -193,9 +193,9 @@ static bool match_dlog_fds(struct dirent *direntp) ...@@ -193,9 +193,9 @@ static bool match_dlog_fds(struct dirent *direntp)
else if (linklen >= PATH_MAX) else if (linklen >= PATH_MAX)
return log_error(false, "The name of link path is too long - \"%s\"", path); return log_error(false, "The name of link path is too long - \"%s\"", path);
if (strcmp(link, "/dev/log_main") == 0 || if (strequal(link, "/dev/log_main") ||
strcmp(link, "/dev/log_system") == 0 || strequal(link, "/dev/log_system") ||
strcmp(link, "/dev/log_radio") == 0) strequal(link, "/dev/log_radio"))
return true; return true;
return false; return false;
...@@ -232,10 +232,10 @@ restart: ...@@ -232,10 +232,10 @@ restart:
struct lxc_list *cur; struct lxc_list *cur;
bool matched = false; bool matched = false;
if (strcmp(direntp->d_name, ".") == 0) if (strequal(direntp->d_name, "."))
continue; continue;
if (strcmp(direntp->d_name, "..") == 0) if (strequal(direntp->d_name, ".."))
continue; continue;
ret = lxc_safe_int(direntp->d_name, &fd); ret = lxc_safe_int(direntp->d_name, &fd);
...@@ -536,7 +536,7 @@ int lxc_poll(const char *name, struct lxc_handler *handler) ...@@ -536,7 +536,7 @@ int lxc_poll(const char *name, struct lxc_handler *handler)
struct lxc_epoll_descr descr, descr_console; struct lxc_epoll_descr descr, descr_console;
if (handler->conf->console.path && if (handler->conf->console.path &&
strcmp(handler->conf->console.path, "none") == 0) strequal(handler->conf->console.path, "none"))
has_console = false; has_console = false;
ret = lxc_mainloop_open(&descr); ret = lxc_mainloop_open(&descr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment