]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
client: fixed minor linter problems
authorMarek Vavruša <mvavrusa@cloudflare.com>
Fri, 12 Jan 2018 06:16:01 +0000 (22:16 -0800)
committerMarek Vavruša <mvavrusa@cloudflare.com>
Fri, 12 Jan 2018 06:18:23 +0000 (22:18 -0800)
client/kresc.c

index 88a48808c21e040d63c8c3b68f137b18234129f2..e9bc073e3a38885f3bdddfc791b0a513210a04ef 100644 (file)
@@ -273,14 +273,14 @@ static unsigned char complete(EditLine * el, int ch)
        //Get position of last dot in current line (useful for parsing table).
        char *dot = strrchr(argv[0], '.');
 
-       if (strncmp(type, "table", 5) && !dot) {
+       if (strncmp(type, "table", 5) != 0 && !dot) {
                //Line is not a name of some table and there is no dot in it.
                complete_globals(el, argv[0], pos);
-       } else if ((dot && !strncmp(type, "nil", 3))
-                  || !strncmp(type, "table", 5)) {
+       } else if ((dot && strncmp(type, "nil", 3) == 0)
+                  || strncmp(type, "table", 5) == 0) {
                //Current line (or part of it) is a name of some table.
                complete_members(el, argv[0], type, pos, dot);
-       } else if (!strncmp(type, "function", 8)) {
+       } else if (strncmp(type, "function", 8) == 0) {
                //Current line is a function.
                complete_function(el);
        }