]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
fix trivial lint:tidy warnings
authorVladimír Čunát <vladimir.cunat@nic.cz>
Fri, 8 Jan 2021 14:25:09 +0000 (15:25 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Tue, 12 Jan 2021 10:55:03 +0000 (11:55 +0100)
These do not make the CI job fail, but better avoid them anyway.
I suspect they got added when we updated the CI docker image.

daemon/bindings/impl.c
modules/dnstap/dnstap.c

index 26b5222d97f09135f31e34f14ba93a86eaed13e7..6f1383c70d9dc8d06a8b25159b407a0d68b0d364 100644 (file)
@@ -43,7 +43,7 @@ static int kluautil_list_dir(lua_State *L)
        struct dirent *entry;
        int lua_i = 1;
        while ((entry = readdir(dir)) != NULL) {
-               if (strcmp(entry->d_name, ".") && strcmp(entry->d_name, "..")) {
+               if (strcmp(entry->d_name, ".") != 0 && strcmp(entry->d_name, "..") != 0) {
                        lua_pushstring(L, entry->d_name);
                        lua_rawseti(L, -2, lua_i++);
                }
index d32f02a5316024ec6ed90af0ce90eb38f369d236..ccddc67ef15377c3dd4611203b48c0a08cf43dee 100644 (file)
@@ -187,7 +187,7 @@ static int dnstap_log(kr_layer_t *ctx, enum dnstap_log_phase phase) {
                        m.has_response_message = rpkt != NULL;
                        if (rpkt != NULL) {
                                m.response_message.len = rpkt->size;
-                               m.response_message.data = (uint8_t *)rpkt->wire;
+                               m.response_message.data = rpkt->wire;
                        }
                }
 
@@ -201,7 +201,7 @@ static int dnstap_log(kr_layer_t *ctx, enum dnstap_log_phase phase) {
        /* Create a dnstap Message */
        Dnstap__Dnstap dnstap = DNSTAP__DNSTAP__INIT;
        dnstap.type = DNSTAP__DNSTAP__TYPE__MESSAGE;
-       dnstap.message = (Dnstap__Message *)&m;
+       dnstap.message = &m;
 
        if (dnstap_dt->identity) {
                dnstap.identity.data = (uint8_t*)dnstap_dt->identity;