Commit dc71fcca by 2xsec

tools: lxc-config: fix coding style of strncmp

Signed-off-by: 's avatar2xsec <dh48.jeong@samsung.com>
parent 8fb41a34
......@@ -61,15 +61,15 @@ int main(int argc, char *argv[])
struct lxc_config_items *i;
const char *value;
if (argc < 2 || !strncmp(argv[1], "-h", strlen(argv[1])) ||
!strncmp(argv[1], "--help", strlen(argv[1])))
if (argc < 2 || strncmp(argv[1], "-h", strlen(argv[1])) == 0 ||
strncmp(argv[1], "--help", strlen(argv[1])) == 0)
usage(argv[0]);
if (!strncmp(argv[1], "-l", strlen(argv[1])))
if (strncmp(argv[1], "-l", strlen(argv[1])) == 0)
list_config_items();
for (i = &items[0]; i->name; i++) {
if (!strncmp(argv[1], i->name, strlen(argv[1]))) {
if (strncmp(argv[1], i->name, strlen(argv[1])) == 0) {
value = lxc_get_global_config_item(i->name);
if (value)
printf("%s\n", value);
......
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